incubator-zeta-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebast...@apache.org
Subject [zeta-commits] svn commit: r982949 - in /incubator/zetacomponents/trunk/UnitTest/src: bootstrap.php constraint/image.php runtests.php test/case.php test/database_settings.php test/image_case.php test/printer.php test/runner.php test/settings.php
Date Fri, 06 Aug 2010 13:21:00 GMT
Author: sebastian
Date: Fri Aug  6 13:21:00 2010
New Revision: 982949

URL: http://svn.apache.org/viewvc?rev=982949&view=rev
Log:
- Clean up for PHPUnit 3.5. PHPUnit 3.5.0 RC1 (or later) is now required.

Modified:
    incubator/zetacomponents/trunk/UnitTest/src/bootstrap.php
    incubator/zetacomponents/trunk/UnitTest/src/constraint/image.php
    incubator/zetacomponents/trunk/UnitTest/src/runtests.php
    incubator/zetacomponents/trunk/UnitTest/src/test/case.php
    incubator/zetacomponents/trunk/UnitTest/src/test/database_settings.php
    incubator/zetacomponents/trunk/UnitTest/src/test/image_case.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

Modified: incubator/zetacomponents/trunk/UnitTest/src/bootstrap.php
URL: http://svn.apache.org/viewvc/incubator/zetacomponents/trunk/UnitTest/src/bootstrap.php?rev=982949&r1=982948&r2=982949&view=diff
==============================================================================
--- incubator/zetacomponents/trunk/UnitTest/src/bootstrap.php (original)
+++ incubator/zetacomponents/trunk/UnitTest/src/bootstrap.php Fri Aug  6 13:21:00 2010
@@ -1,6 +1,6 @@
 <?php
 /**
- * File contaning the bootstrap script for the eZ Components test runner.
+ * File contaning the bootstrap script for the Zeta Components test runner.
  *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -24,13 +24,11 @@
  * @copyright Copyright (C) 2005-2010 eZ Systems AS. All rights reserved.
  * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
  */
-require_once 'PHPUnit/Util/Filter.php';
-
-PHPUnit_Util_Filter::addFileToFilter( __FILE__, 'PHPUNIT' );
+PHP_CodeCoverage::getInstance()->filter()->addFileToBlacklist( __FILE__, 'PHPUNIT'
);
 
 // All errors must be reported
 $currentErrorLevel = error_reporting();
-if ( $currentErrorLevel != ( E_ALL | E_STRICT ) )
+if ( ! ( $currentErrorLevel == -1 || $currentErrorLevel == ( E_ALL | E_STRICT ) ) )
 {
     echo "Your error reporting setting is not E_ALL | E_STRICT, please change\nthis in your
php.ini.\n";
     die();
@@ -40,7 +38,7 @@ ini_set( 'include_path', getcwd(). PATH_
 
 require_once 'Base/src/base.php';
 
-function __autoload( $className )
+function ezc_autoload( $className )
 {
     if ( strpos( $className, '_' ) !== false )
     {
@@ -50,4 +48,6 @@ function __autoload( $className )
     }
     ezcBase::autoload( $className );
 }
+
+spl_autoload_register( 'ezc_autoload' );
 ?>

Modified: incubator/zetacomponents/trunk/UnitTest/src/constraint/image.php
URL: http://svn.apache.org/viewvc/incubator/zetacomponents/trunk/UnitTest/src/constraint/image.php?rev=982949&r1=982948&r2=982949&view=diff
==============================================================================
--- incubator/zetacomponents/trunk/UnitTest/src/constraint/image.php (original)
+++ incubator/zetacomponents/trunk/UnitTest/src/constraint/image.php Fri Aug  6 13:21:00 2010
@@ -24,10 +24,7 @@
  * @copyright Copyright (C) 2005-2010 eZ Systems AS. All rights reserved.
  * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
  */
-
-require_once 'PHPUnit/Util/Filter.php';
-
-PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
+PHP_CodeCoverage::getInstance()->filter()->addFileToBlacklist( __FILE__, 'PHPUNIT'
);
 
 /**
  * Constraint class for image comparison.

Modified: incubator/zetacomponents/trunk/UnitTest/src/runtests.php
URL: http://svn.apache.org/viewvc/incubator/zetacomponents/trunk/UnitTest/src/runtests.php?rev=982949&r1=982948&r2=982949&view=diff
==============================================================================
--- incubator/zetacomponents/trunk/UnitTest/src/runtests.php (original)
+++ incubator/zetacomponents/trunk/UnitTest/src/runtests.php Fri Aug  6 13:21:00 2010
@@ -1,7 +1,7 @@
 #!/usr/bin/env php
 <?php
 /**
- * File contaning the execution script for the eZ Components test runner.
+ * File contaning the execution script for the Zeta Components test runner.
  *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -25,18 +25,17 @@
  * @copyright Copyright (C) 2005-2010 eZ Systems AS. All rights reserved.
  * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
  */
-
-require_once 'PHPUnit/Runner/Version.php';
-require_once 'PHPUnit/Util/Filter.php';
+require_once 'PHPUnit/Autoload.php';
 
 $version = PHPUnit_Runner_Version::id();
 
-if ( version_compare( $version, '3.4.0' ) == -1 && $version !== '@package_version@'
)
+if ( version_compare( $version, '3.5.0' ) == -1 && $version !== '@package_version@'
)
 {
-    die( "PHPUnit 3.4.0 (or later) is required to run this test suite.\n" );
+    die( "PHPUnit 3.5.0 (or later) is required to run this test suite.\n" );
 }
 
-PHPUnit_Util_Filter::addFileToFilter( __FILE__, 'PHPUNIT' );
+require_once 'PHP/CodeCoverage.php';
+PHP_CodeCoverage::getInstance()->filter()->addFileToBlacklist( __FILE__, 'PHPUNIT'
);
 
 require_once 'bootstrap.php';
 

Modified: incubator/zetacomponents/trunk/UnitTest/src/test/case.php
URL: http://svn.apache.org/viewvc/incubator/zetacomponents/trunk/UnitTest/src/test/case.php?rev=982949&r1=982948&r2=982949&view=diff
==============================================================================
--- incubator/zetacomponents/trunk/UnitTest/src/test/case.php (original)
+++ incubator/zetacomponents/trunk/UnitTest/src/test/case.php Fri Aug  6 13:21:00 2010
@@ -24,13 +24,10 @@
  * @copyright Copyright (C) 2005-2010 eZ Systems AS. All rights reserved.
  * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
  */
-require_once 'PHPUnit/Framework/TestCase.php';
-require_once 'PHPUnit/Util/Filter.php';
-
-PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
+PHP_CodeCoverage::getInstance()->filter()->addFileToBlacklist( __FILE__, 'PHPUNIT'
);
 
 /**
- * Abstract base class for all eZ Components test cases.
+ * Abstract base class for all Zeta Components test cases.
  *
  * @package UnitTest
  * @version //autogentag//

Modified: incubator/zetacomponents/trunk/UnitTest/src/test/database_settings.php
URL: http://svn.apache.org/viewvc/incubator/zetacomponents/trunk/UnitTest/src/test/database_settings.php?rev=982949&r1=982948&r2=982949&view=diff
==============================================================================
--- incubator/zetacomponents/trunk/UnitTest/src/test/database_settings.php (original)
+++ incubator/zetacomponents/trunk/UnitTest/src/test/database_settings.php Fri Aug  6 13:21:00
2010
@@ -24,10 +24,7 @@
  * @copyright Copyright (C) 2005-2010 eZ Systems AS. All rights reserved.
  * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
  */
-
-require_once 'PHPUnit/Util/Filter.php';
-
-PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
+PHP_CodeCoverage::getInstance()->filter()->addFileToBlacklist( __FILE__, 'PHPUNIT'
);
 
 /**
  * This class represents the structure of all the database settings.

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=982949&r1=982948&r2=982949&view=diff
==============================================================================
--- incubator/zetacomponents/trunk/UnitTest/src/test/image_case.php (original)
+++ incubator/zetacomponents/trunk/UnitTest/src/test/image_case.php Fri Aug  6 13:21:00 2010
@@ -24,10 +24,7 @@
  * @copyright Copyright (C) 2005-2010 eZ Systems AS. All rights reserved.
  * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
  */
-require_once 'PHPUnit/Framework/TestCase.php';
-require_once 'PHPUnit/Util/Filter.php';
-
-PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
+PHP_CodeCoverage::getInstance()->filter()->addFileToBlacklist( __FILE__, 'PHPUNIT'
);
 
 /**
  * Abstract base class for image related test cases.

Modified: incubator/zetacomponents/trunk/UnitTest/src/test/printer.php
URL: http://svn.apache.org/viewvc/incubator/zetacomponents/trunk/UnitTest/src/test/printer.php?rev=982949&r1=982948&r2=982949&view=diff
==============================================================================
--- incubator/zetacomponents/trunk/UnitTest/src/test/printer.php (original)
+++ incubator/zetacomponents/trunk/UnitTest/src/test/printer.php Fri Aug  6 13:21:00 2010
@@ -24,10 +24,7 @@
  * @copyright Copyright (C) 2005-2010 eZ Systems AS. All rights reserved.
  * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
  */
-require_once 'PHPUnit/TextUI/ResultPrinter.php';
-require_once 'PHPUnit/Util/Filter.php';
-
-PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
+PHP_CodeCoverage::getInstance()->filter()->addFileToBlacklist( __FILE__, 'PHPUNIT'
);
 
 /**
  * Test printer class.

Modified: incubator/zetacomponents/trunk/UnitTest/src/test/runner.php
URL: http://svn.apache.org/viewvc/incubator/zetacomponents/trunk/UnitTest/src/test/runner.php?rev=982949&r1=982948&r2=982949&view=diff
==============================================================================
--- incubator/zetacomponents/trunk/UnitTest/src/test/runner.php (original)
+++ incubator/zetacomponents/trunk/UnitTest/src/test/runner.php Fri Aug  6 13:21:00 2010
@@ -24,15 +24,10 @@
  * @copyright Copyright (C) 2005-2010 eZ Systems AS. All rights reserved.
  * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
  */
-
-require_once 'PHPUnit/TextUI/Command.php';
-require_once 'PHPUnit/Util/Class.php';
-require_once 'PHPUnit/Util/Filter.php';
-
-PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
+PHP_CodeCoverage::getInstance()->filter()->addFileToBlacklist( __FILE__, 'PHPUNIT'
);
 
 /**
- * Test runner to run the eZ Components test suite(s).
+ * Test runner to run the Zeta Components test suite(s).
  *
  * @package UnitTest
  * @version //autogentag//
@@ -75,7 +70,7 @@ class ezcTestRunner extends PHPUnit_Text
         }
 
         $this->arguments['test'] = new PHPUnit_Framework_TestSuite;
-        $this->arguments['test']->setName( 'eZ Components' );
+        $this->arguments['test']->setName( 'Zeta Components' );
 
         if ( empty( $packages ) )
         {

Modified: incubator/zetacomponents/trunk/UnitTest/src/test/settings.php
URL: http://svn.apache.org/viewvc/incubator/zetacomponents/trunk/UnitTest/src/test/settings.php?rev=982949&r1=982948&r2=982949&view=diff
==============================================================================
--- incubator/zetacomponents/trunk/UnitTest/src/test/settings.php (original)
+++ incubator/zetacomponents/trunk/UnitTest/src/test/settings.php Fri Aug  6 13:21:00 2010
@@ -24,10 +24,7 @@
  * @copyright Copyright (C) 2005-2010 eZ Systems AS. All rights reserved.
  * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
  */
-
-require_once 'PHPUnit/Util/Filter.php';
-
-PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
+PHP_CodeCoverage::getInstance()->filter()->addFileToBlacklist( __FILE__, 'PHPUNIT'
);
 
 /**
  * This object stores the settings from the TestRunner.



Mime
View raw message