You are viewing a plain text version of this content. The canonical link for it is here.
Posted to zeta-commits@incubator.apache.org by se...@apache.org on 2011/10/11 08:17:07 UTC
[zeta-commits] svn commit: r1181653 - in /incubator/zetacomponents/trunk: ./ Archive/tests/
Authentication/tests/ AuthenticationDatabaseTiein/tests/
AuthenticationDatabaseTiein/tests/filters/database/
AuthenticationDatabaseTiein/tests/filters/openid/ Base/tests/ Cach...
Author: sebastian
Date: Tue Oct 11 08:17:05 2011
New Revision: 1181653
URL: http://svn.apache.org/viewvc?rev=1181653&view=rev
Log:
Remove custom test runner.
Added:
incubator/zetacomponents/trunk/bootstrap.php
- copied, changed from r1175712, incubator/zetacomponents/trunk/UnitTest/src/bootstrap.php
incubator/zetacomponents/trunk/phpunit.xml.dist
Removed:
incubator/zetacomponents/trunk/Archive/tests/archive_entry_test.php
incubator/zetacomponents/trunk/Archive/tests/suite.php
incubator/zetacomponents/trunk/Authentication/tests/suite.php
incubator/zetacomponents/trunk/AuthenticationDatabaseTiein/tests/suite.php
incubator/zetacomponents/trunk/Base/tests/suite.php
incubator/zetacomponents/trunk/Cache/tests/suite.php
incubator/zetacomponents/trunk/Configuration/tests/suite.php
incubator/zetacomponents/trunk/ConsoleTools/tests/suite.php
incubator/zetacomponents/trunk/Database/tests/suite.php
incubator/zetacomponents/trunk/DatabaseSchema/tests/suite.php
incubator/zetacomponents/trunk/Debug/tests/suite.php
incubator/zetacomponents/trunk/Document/tests/bbcode/suite.php
incubator/zetacomponents/trunk/Document/tests/odt/suite.php
incubator/zetacomponents/trunk/Document/tests/pdf/suite.php
incubator/zetacomponents/trunk/Document/tests/suite.php
incubator/zetacomponents/trunk/EventLog/tests/suite.php
incubator/zetacomponents/trunk/EventLogDatabaseTiein/tests/suite.php
incubator/zetacomponents/trunk/Execution/tests/suite.php
incubator/zetacomponents/trunk/Feed/tests/suite.php
incubator/zetacomponents/trunk/File/tests/suite.php
incubator/zetacomponents/trunk/Graph/tests/suite.php
incubator/zetacomponents/trunk/GraphDatabaseTiein/tests/suite.php
incubator/zetacomponents/trunk/ImageAnalysis/tests/suite.php
incubator/zetacomponents/trunk/ImageConversion/tests/suite.php
incubator/zetacomponents/trunk/Mail/tests/suite.php
incubator/zetacomponents/trunk/MvcMailTiein/tests/suite.php
incubator/zetacomponents/trunk/MvcTemplateTiein/tests/suite.php
incubator/zetacomponents/trunk/MvcTools/tests/suite.php
incubator/zetacomponents/trunk/PersistentObject/tests/suite.php
incubator/zetacomponents/trunk/PersistentObjectDatabaseSchemaTiein/tests/suite.php
incubator/zetacomponents/trunk/PhpGenerator/tests/suite.php
incubator/zetacomponents/trunk/Reflection/tests/suite.php
incubator/zetacomponents/trunk/Search/tests/suite.php
incubator/zetacomponents/trunk/SignalSlot/tests/suite.php
incubator/zetacomponents/trunk/SystemInformation/tests/suite.php
incubator/zetacomponents/trunk/Template/tests/suite.php
incubator/zetacomponents/trunk/TemplateTranslationTiein/tests/suite.php
incubator/zetacomponents/trunk/Translation/tests/suite.php
incubator/zetacomponents/trunk/TranslationCacheTiein/tests/suite.php
incubator/zetacomponents/trunk/Tree/tests/suite.php
incubator/zetacomponents/trunk/TreeDatabaseTiein/tests/suite.php
incubator/zetacomponents/trunk/TreePersistentObjectTiein/tests/suite.php
incubator/zetacomponents/trunk/UnitTest/src/bootstrap.php
incubator/zetacomponents/trunk/UnitTest/src/runtests.php
incubator/zetacomponents/trunk/UnitTest/src/test/database_settings.php
incubator/zetacomponents/trunk/UnitTest/src/test/printer.php
incubator/zetacomponents/trunk/UnitTest/src/test/runner.php
incubator/zetacomponents/trunk/UnitTest/src/test/settings.php
incubator/zetacomponents/trunk/Url/tests/suite.php
incubator/zetacomponents/trunk/UserInput/tests/suite.php
incubator/zetacomponents/trunk/Webdav/tests/suite.php
incubator/zetacomponents/trunk/Workflow/tests/suite.php
incubator/zetacomponents/trunk/WorkflowDatabaseTiein/tests/suite.php
incubator/zetacomponents/trunk/WorkflowEventLogTiein/tests/suite.php
incubator/zetacomponents/trunk/WorkflowSignalSlotTiein/tests/suite.php
Modified:
incubator/zetacomponents/trunk/AuthenticationDatabaseTiein/tests/filters/database/database_test.php
incubator/zetacomponents/trunk/AuthenticationDatabaseTiein/tests/filters/openid/openid_db_store_test.php
incubator/zetacomponents/trunk/UnitTest/src/constraint/image.php
incubator/zetacomponents/trunk/UnitTest/src/test/case.php
incubator/zetacomponents/trunk/UnitTest/src/test/image_case.php
incubator/zetacomponents/trunk/UnitTest/src/test_autoload.php
incubator/zetacomponents/trunk/WorkflowDatabaseTiein/tests/case.php
Modified: incubator/zetacomponents/trunk/AuthenticationDatabaseTiein/tests/filters/database/database_test.php
URL: http://svn.apache.org/viewvc/incubator/zetacomponents/trunk/AuthenticationDatabaseTiein/tests/filters/database/database_test.php?rev=1181653&r1=1181652&r2=1181653&view=diff
==============================================================================
--- incubator/zetacomponents/trunk/AuthenticationDatabaseTiein/tests/filters/database/database_test.php (original)
+++ incubator/zetacomponents/trunk/AuthenticationDatabaseTiein/tests/filters/database/database_test.php Tue Oct 11 08:17:05 2011
@@ -50,10 +50,10 @@ class ezcAuthenticationDatabaseTest exte
{
try
{
- $this->db = ezcDbInstance::get();
+ $this->db = ezcDbFactory::create( ZETA_TESTSUITE_DSN );
if ( $this->db === false )
{
- $this->markTestSkipped( "You must provide a database to runtests.php." );
+ $this->markTestSkipped( "You must set ZETA_TESTSUITE_DSN in phpunit.xml." );
}
$tables = array( self::$table => new ezcDbSchemaTable(
Modified: incubator/zetacomponents/trunk/AuthenticationDatabaseTiein/tests/filters/openid/openid_db_store_test.php
URL: http://svn.apache.org/viewvc/incubator/zetacomponents/trunk/AuthenticationDatabaseTiein/tests/filters/openid/openid_db_store_test.php?rev=1181653&r1=1181652&r2=1181653&view=diff
==============================================================================
--- incubator/zetacomponents/trunk/AuthenticationDatabaseTiein/tests/filters/openid/openid_db_store_test.php (original)
+++ incubator/zetacomponents/trunk/AuthenticationDatabaseTiein/tests/filters/openid/openid_db_store_test.php Tue Oct 11 08:17:05 2011
@@ -104,7 +104,7 @@ class ezcAuthenticationOpenidDbStoreTest
try
{
- $this->db = ezcDbInstance::get();
+ $this->db = ezcDbFactory::create( ZETA_TESTSUITE_DSN );
$schema = ezcDbSchema::createFromFile(
'array',
@@ -115,7 +115,7 @@ class ezcAuthenticationOpenidDbStoreTest
catch ( Exception $e )
{
- $this->markTestSkipped( "You must provide a database to runtests.php: " . $e->getMessage() );
+ $this->markTestSkipped( "You must set ZETA_TESTSUITE_DSN in phpunit.xml." );
}
}
Modified: incubator/zetacomponents/trunk/UnitTest/src/constraint/image.php
URL: http://svn.apache.org/viewvc/incubator/zetacomponents/trunk/UnitTest/src/constraint/image.php?rev=1181653&r1=1181652&r2=1181653&view=diff
==============================================================================
--- incubator/zetacomponents/trunk/UnitTest/src/constraint/image.php (original)
+++ incubator/zetacomponents/trunk/UnitTest/src/constraint/image.php Tue Oct 11 08:17:05 2011
@@ -23,7 +23,6 @@
* @version //autogentag//
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
*/
-PHP_CodeCoverage::getInstance()->filter()->addFileToBlacklist( __FILE__, 'PHPUNIT' );
/**
* Constraint class for image comparison.
Modified: incubator/zetacomponents/trunk/UnitTest/src/test/case.php
URL: http://svn.apache.org/viewvc/incubator/zetacomponents/trunk/UnitTest/src/test/case.php?rev=1181653&r1=1181652&r2=1181653&view=diff
==============================================================================
--- incubator/zetacomponents/trunk/UnitTest/src/test/case.php (original)
+++ incubator/zetacomponents/trunk/UnitTest/src/test/case.php Tue Oct 11 08:17:05 2011
@@ -23,7 +23,6 @@
* @version //autogentag//
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
*/
-PHP_CodeCoverage::getInstance()->filter()->addFileToBlacklist( __FILE__, 'PHPUNIT' );
/**
* Abstract base class for all Zeta Components test cases.
Modified: incubator/zetacomponents/trunk/UnitTest/src/test/image_case.php
URL: http://svn.apache.org/viewvc/incubator/zetacomponents/trunk/UnitTest/src/test/image_case.php?rev=1181653&r1=1181652&r2=1181653&view=diff
==============================================================================
--- incubator/zetacomponents/trunk/UnitTest/src/test/image_case.php (original)
+++ incubator/zetacomponents/trunk/UnitTest/src/test/image_case.php Tue Oct 11 08:17:05 2011
@@ -23,7 +23,6 @@
* @version //autogentag//
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
*/
-PHP_CodeCoverage::getInstance()->filter()->addFileToBlacklist( __FILE__, 'PHPUNIT' );
/**
* Abstract base class for image related test cases.
Modified: incubator/zetacomponents/trunk/UnitTest/src/test_autoload.php
URL: http://svn.apache.org/viewvc/incubator/zetacomponents/trunk/UnitTest/src/test_autoload.php?rev=1181653&r1=1181652&r2=1181653&view=diff
==============================================================================
--- incubator/zetacomponents/trunk/UnitTest/src/test_autoload.php (original)
+++ incubator/zetacomponents/trunk/UnitTest/src/test_autoload.php Tue Oct 11 08:17:05 2011
@@ -28,12 +28,8 @@
return array(
'ezcTestCase' => 'UnitTest/test/case.php',
'ezcTestConstraintSimilarImage' => 'UnitTest/constraint/image.php',
- 'ezcTestDatabaseSettings' => 'UnitTest/test/database_settings.php',
'ezcTestImageCase' => 'UnitTest/test/image_case.php',
- 'ezcTestPrinter' => 'UnitTest/test/printer.php',
'ezcTestRegressionSuite' => 'UnitTest/regression_suite.php',
'ezcTestRegressionTest' => 'UnitTest/regression_test.php',
- 'ezcTestRunner' => 'UnitTest/test/runner.php',
- 'ezcTestSettings' => 'UnitTest/test/settings.php',
);
?>
Modified: incubator/zetacomponents/trunk/WorkflowDatabaseTiein/tests/case.php
URL: http://svn.apache.org/viewvc/incubator/zetacomponents/trunk/WorkflowDatabaseTiein/tests/case.php?rev=1181653&r1=1181652&r2=1181653&view=diff
==============================================================================
--- incubator/zetacomponents/trunk/WorkflowDatabaseTiein/tests/case.php (original)
+++ incubator/zetacomponents/trunk/WorkflowDatabaseTiein/tests/case.php Tue Oct 11 08:17:05 2011
@@ -41,7 +41,7 @@ abstract class ezcWorkflowDatabaseTieinT
try
{
- $this->db = ezcDbInstance::get();
+ $this->db = ezcDbFactory::create( ZETA_TESTSUITE_DSN );
$this->cleanupTables( $this->db );
Copied: incubator/zetacomponents/trunk/bootstrap.php (from r1175712, incubator/zetacomponents/trunk/UnitTest/src/bootstrap.php)
URL: http://svn.apache.org/viewvc/incubator/zetacomponents/trunk/bootstrap.php?p2=incubator/zetacomponents/trunk/bootstrap.php&p1=incubator/zetacomponents/trunk/UnitTest/src/bootstrap.php&r1=1175712&r2=1181653&rev=1181653&view=diff
==============================================================================
--- incubator/zetacomponents/trunk/UnitTest/src/bootstrap.php (original)
+++ incubator/zetacomponents/trunk/bootstrap.php Tue Oct 11 08:17:05 2011
@@ -1,6 +1,6 @@
<?php
/**
- * File contaning the bootstrap script for the Zeta Components test runner.
+ * File contaning the bootstrap script for the Zeta Components test suite.
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -19,11 +19,9 @@
* specific language governing permissions and limitations
* under the License.
*
- * @package UnitTest
* @version //autogentag//
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
*/
-PHP_CodeCoverage::getInstance()->filter()->addFileToBlacklist( __FILE__, 'PHPUNIT' );
// All errors must be reported
$currentErrorLevel = error_reporting();
@@ -33,7 +31,7 @@ if ( ! ( $currentErrorLevel == -1 || $cu
die();
}
-ini_set( 'include_path', getcwd(). PATH_SEPARATOR . dirname( __FILE__ ) . '/../..' . PATH_SEPARATOR . ini_get( 'include_path' ) );
+ini_set( 'include_path', getcwd() . PATH_SEPARATOR . ini_get( 'include_path' ) );
require_once 'Base/src/base.php';
Added: incubator/zetacomponents/trunk/phpunit.xml.dist
URL: http://svn.apache.org/viewvc/incubator/zetacomponents/trunk/phpunit.xml.dist?rev=1181653&view=auto
==============================================================================
--- incubator/zetacomponents/trunk/phpunit.xml.dist (added)
+++ incubator/zetacomponents/trunk/phpunit.xml.dist Tue Oct 11 08:17:05 2011
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<phpunit bootstrap="bootstrap.php"
+ verbose="true"
+ backupGlobals="true"
+ backupStaticAttributes="false"
+ convertErrorsToExceptions="true"
+ convertNoticesToExceptions="false"
+ convertWarningsToExceptions="false">
+ <testsuites>
+ <testsuite name="Zeta Components">
+ <testsuite name="Archive">
+ <directory suffix="_test.php">Archive/tests</directory>
+ </testsuite>
+
+ <testsuite name="Authentication">
+ <directory suffix="_test.php">Authentication/tests</directory>
+ </testsuite>
+
+ <testsuite name="AuthenticationDatabaseTiein">
+ <directory suffix="_test.php">AuthenticationDatabaseTiein/tests</directory>
+ </testsuite>
+<!--
+ <testsuite name="Base">
+ <directory suffix="_test.php">Base/tests</directory>
+ </testsuite>
+-->
+ <testsuite name="Workflow">
+ <directory suffix="_test.php">Workflow/tests</directory>
+ </testsuite>
+
+ <testsuite name="WorkflowDatabaseTiein">
+ <directory suffix="_test.php">WorkflowDatabaseTiein/tests</directory>
+ </testsuite>
+
+ <testsuite name="WorkflowEventLogTiein">
+ <directory suffix="_test.php">WorkflowEventLogTiein/tests</directory>
+ </testsuite>
+
+ <testsuite name="WorkflowSignalSlotTiein">
+ <directory suffix="_test.php">WorkflowSignalSlotTiein/tests</directory>
+ </testsuite>
+ </testsuite>
+ </testsuites>
+
+ <filter>
+ <whitelist addUncoveredFilesFromWhitelist="true">
+ <directory suffix=".php">Archive/src</directory>
+ <directory suffix=".php">Authentication/src</directory>
+ <directory suffix=".php">AuthenticationDatabaseTiein/src</directory>
+ <!--<directory suffix=".php">Base/src</directory>-->
+ <directory suffix=".php">Workflow/src</directory>
+ <directory suffix=".php">WorkflowDatabaseTiein/src</directory>
+ <directory suffix=".php">WorkflowEventLogTiein/src</directory>
+ <directory suffix=".php">WorkflowSignalSlotTiein/src</directory>
+
+ <exclude>
+ <file>Archive/src/archive_autoload.php</file>
+ <file>Authentication/src/authentication_autoload.php</file>
+ <file>AuthenticationDatabaseTiein/src/authentication_database_autoload.php</file>
+ <!--<file>Base/src/base_autoload.php</file>-->
+ <file>Workflow/src/workflow_autoload.php</file>
+ <file>WorkflowDatabaseTiein/src/workflow_database_autoload.php</file>
+ <file>WorkflowEventLogTiein/src/workflow_event_autoload.php</file>
+ <file>WorkflowSignalSlotTiein/src/workflow_signal_autoload.php</file>
+ </exclude>
+ </whitelist>
+ </filter>
+
+ <php>
+ <const name="ZETA_TESTSUITE_DSN" value="sqlite://:memory:"/>
+ </php>
+</phpunit>