diff -Nru php-zeta-base-1.9/debian/autoload_ci.php php-zeta-base-1.9/debian/autoload_ci.php --- php-zeta-base-1.9/debian/autoload_ci.php 2016-03-23 16:10:03.000000000 -0400 +++ php-zeta-base-1.9/debian/autoload_ci.php 2018-02-19 15:45:02.000000000 -0500 @@ -2,3 +2,5 @@ require_once 'ezc/Base/autoload.php'; require_once 'ezc/UnitTest/autoload.php'; +require_once 'Composer/autoload.php'; +require_once 'Symfony/Component/Yaml/autoload.php'; diff -Nru php-zeta-base-1.9/debian/autoload_tests.php php-zeta-base-1.9/debian/autoload_tests.php --- php-zeta-base-1.9/debian/autoload_tests.php 2016-03-23 16:10:03.000000000 -0400 +++ php-zeta-base-1.9/debian/autoload_tests.php 2018-02-19 14:36:26.000000000 -0500 @@ -2,3 +2,5 @@ require_once __DIR__ . '/../src/autoload.php'; require_once 'ezc/UnitTest/autoload.php'; +require_once 'Composer/autoload.php'; +require_once 'Symfony/Component/Yaml/autoload.php'; diff -Nru php-zeta-base-1.9/debian/changelog php-zeta-base-1.9/debian/changelog --- php-zeta-base-1.9/debian/changelog 2016-03-23 16:10:26.000000000 -0400 +++ php-zeta-base-1.9/debian/changelog 2018-02-19 12:57:17.000000000 -0500 @@ -1,3 +1,9 @@ +php-zeta-base (1.9-3ubuntu1) UNRELEASED; urgency=medium + + * Switch to PHPUnit 6's namespaced classes (LP: #1750041). + + -- Matt Coleman Mon, 19 Feb 2018 12:56:48 -0500 + php-zeta-base (1.9-3) unstable; urgency=medium * Rebuild with recent pkg-php-tools for the PHP 7.0 transition diff -Nru php-zeta-base-1.9/debian/control php-zeta-base-1.9/debian/control --- php-zeta-base-1.9/debian/control 2016-03-23 16:10:03.000000000 -0400 +++ php-zeta-base-1.9/debian/control 2018-02-19 16:10:44.000000000 -0500 @@ -1,14 +1,17 @@ Source: php-zeta-base Section: php Priority: optional -Maintainer: Debian PHP PEAR Maintainers +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Debian PHP PEAR Maintainers Uploaders: David Prévot , Prach Pongpanich Build-Depends: debhelper (>= 9), + composer, imagemagick, php-zeta-unit-test (>= 1.0.2-2~), phpab, - phpunit, + phpunit (>= 6), + phpunit-dbunit, pkg-php-tools (>= 1.7~) Standards-Version: 3.9.7 Homepage: http://zetacomponents.org/ diff -Nru php-zeta-base-1.9/debian/patches/0003-phpunit6-compatibility.patch php-zeta-base-1.9/debian/patches/0003-phpunit6-compatibility.patch --- php-zeta-base-1.9/debian/patches/0003-phpunit6-compatibility.patch 1969-12-31 19:00:00.000000000 -0500 +++ php-zeta-base-1.9/debian/patches/0003-phpunit6-compatibility.patch 2018-02-19 16:04:54.000000000 -0500 @@ -0,0 +1,484 @@ +Index: php-zeta-base-1.9/tests/features_unix_test.php +=================================================================== +--- php-zeta-base-1.9.orig/tests/features_unix_test.php ++++ php-zeta-base-1.9/tests/features_unix_test.php +@@ -23,6 +23,9 @@ + * @version //autogentag// + * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0 + */ ++ ++use PHPUnit\Framework\TestSuite; ++ + /** + * @package Base + * @subpackage Tests +@@ -156,7 +159,7 @@ class ezcBaseFeaturesUnixTest extends ez + + public static function suite() + { +- return new PHPUnit_Framework_TestSuite(__CLASS__); ++ return new TestSuite(__CLASS__); + } + } + ?> +Index: php-zeta-base-1.9/tests/base_init_test.php +=================================================================== +--- php-zeta-base-1.9.orig/tests/base_init_test.php ++++ php-zeta-base-1.9/tests/base_init_test.php +@@ -27,6 +27,8 @@ + require_once 'init/base_init_callback.php'; + require_once 'init/base_init_class.php'; + ++use PHPUnit\Framework\TestSuite; ++ + /** + * @package Base + * @subpackage Tests +@@ -92,7 +94,7 @@ class ezcBaseInitTest extends ezcTestCas + + public static function suite() + { +- return new PHPUnit_Framework_TestSuite("ezcBaseInitTest"); ++ return new TestSuite("ezcBaseInitTest"); + } + } + ?> +Index: php-zeta-base-1.9/tests/file_remove_recursive_test.php +=================================================================== +--- php-zeta-base-1.9.orig/tests/file_remove_recursive_test.php ++++ php-zeta-base-1.9/tests/file_remove_recursive_test.php +@@ -25,6 +25,8 @@ + * @subpackage Tests + */ + ++use PHPUnit\Framework\TestSuite; ++ + /** + * @package Base + * @subpackage Tests +@@ -168,7 +170,7 @@ class ezcBaseFileRemoveRecursiveTest ext + + public static function suite() + { +- return new PHPUnit_Framework_TestSuite( "ezcBaseFileRemoveRecursiveTest" ); ++ return new TestSuite( "ezcBaseFileRemoveRecursiveTest" ); + } + } + ?> +Index: php-zeta-base-1.9/tests/file_copy_recursive_test.php +=================================================================== +--- php-zeta-base-1.9.orig/tests/file_copy_recursive_test.php ++++ php-zeta-base-1.9/tests/file_copy_recursive_test.php +@@ -25,6 +25,8 @@ + * @subpackage Tests + */ + ++use PHPUnit\Framework\TestSuite; ++ + /** + * @package Base + * @subpackage Tests +@@ -197,19 +199,11 @@ class ezcBaseFileCopyRecursiveTest exten + + public function testRecursiveCopyFailureNotExisting() + { +- try +- { +- ezcBaseFile::copyRecursive( +- $this->tempDir . '/not_existing', +- $this->tempDir . '/dest' +- ); +- } +- catch ( ezcBaseFileNotFoundException $e ) +- { +- return; +- } +- +- $this->fail( 'Expected ezcBaseFileNotFoundException.' ); ++ $this->expectException('ezcBaseFileNotFoundException'); ++ ezcBaseFile::copyRecursive( ++ $this->tempDir . '/not_existing', ++ $this->tempDir . '/dest' ++ ); + } + + public function testRecursiveCopyFailureNotReadable() +@@ -230,24 +224,16 @@ class ezcBaseFileCopyRecursiveTest exten + + public function testRecursiveCopyFailureNotWriteable() + { +- try +- { +- ezcBaseFile::copyRecursive( +- $this->tempDir . '/dir2', +- $this->tempDir . '/dir4' +- ); +- } +- catch ( ezcBaseFilePermissionException $e ) +- { +- return; +- } +- +- $this->fail( 'Expected ezcBaseFilePermissionException.' ); ++ $this->expectException('ezcBaseFilePermissionException'); ++ ezcBaseFile::copyRecursive( ++ $this->tempDir . '/dir2', ++ $this->tempDir . '/dir4' ++ ); + } + + public static function suite() + { +- return new PHPUnit_Framework_TestSuite( __CLASS__ ); ++ return new TestSuite( __CLASS__ ); + } + + public function testRecursiveCopyDirCalled0() +Index: php-zeta-base-1.9/tests/features_windows_test.php +=================================================================== +--- php-zeta-base-1.9.orig/tests/features_windows_test.php ++++ php-zeta-base-1.9/tests/features_windows_test.php +@@ -23,6 +23,9 @@ + * @version //autogentag// + * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0 + */ ++ ++use PHPUnit\Framework\TestSuite; ++ + /** + * @package Base + * @subpackage Tests +@@ -156,7 +159,7 @@ class ezcBaseFeaturesWindowsTest extends + + public static function suite() + { +- return new PHPUnit_Framework_TestSuite( __CLASS__ ); ++ return new TestSuite( __CLASS__ ); + } + } + ?> +Index: php-zeta-base-1.9/tests/file_calculate_relative_path_test.php +=================================================================== +--- php-zeta-base-1.9.orig/tests/file_calculate_relative_path_test.php ++++ php-zeta-base-1.9/tests/file_calculate_relative_path_test.php +@@ -25,6 +25,8 @@ + * @subpackage Tests + */ + ++use PHPUnit\Framework\TestSuite; ++ + /** + * @package Base + * @subpackage Tests +@@ -103,7 +105,7 @@ class ezcBaseFileCalculateRelativePathTe + + public static function suite() + { +- return new PHPUnit_Framework_TestSuite( "ezcBaseFileCalculateRelativePathTest" ); ++ return new TestSuite( "ezcBaseFileCalculateRelativePathTest" ); + } + } + ?> +Index: php-zeta-base-1.9/tests/struct_test.php +=================================================================== +--- php-zeta-base-1.9.orig/tests/struct_test.php ++++ php-zeta-base-1.9/tests/struct_test.php +@@ -23,6 +23,9 @@ + * @version //autogentag// + * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0 + */ ++ ++use PHPUnit\Framework\TestSuite; ++ + /** + * @package Base + * @subpackage Tests +@@ -64,7 +67,7 @@ class ezcBaseStructTest extends ezcTestC + + public static function suite() + { +- return new PHPUnit_Framework_TestSuite( "ezcBaseStructTest" ); ++ return new TestSuite( "ezcBaseStructTest" ); + } + } + ?> +Index: php-zeta-base-1.9/tests/file_is_absolute_path.php +=================================================================== +--- php-zeta-base-1.9.orig/tests/file_is_absolute_path.php ++++ php-zeta-base-1.9/tests/file_is_absolute_path.php +@@ -25,6 +25,8 @@ + * @subpackage Tests + */ + ++use PHPUnit\Framework\TestSuite; ++ + /** + * @package Base + * @subpackage Tests +@@ -241,7 +243,7 @@ class ezcBaseFileIsAbsoluteTest extends + + public static function suite() + { +- return new PHPUnit_Framework_TestSuite( "ezcBaseFileIsAbsoluteTest" ); ++ return new TestSuite( "ezcBaseFileIsAbsoluteTest" ); + } + } + ?> +Index: php-zeta-base-1.9/tests/base_options_test.php +=================================================================== +--- php-zeta-base-1.9.orig/tests/base_options_test.php ++++ php-zeta-base-1.9/tests/base_options_test.php +@@ -26,6 +26,8 @@ + + require_once dirname( __FILE__ ) . '/test_options.php'; + ++use PHPUnit\Framework\TestSuite; ++ + /** + * @package Base + * @subpackage Tests +@@ -34,49 +36,28 @@ class ezcBaseOptionsTest extends ezcTest + { + public static function suite() + { +- return new PHPUnit_Framework_TestSuite("ezcBaseOptionsTest"); ++ return new TestSuite("ezcBaseOptionsTest"); + } + + public function testGetAccessFailure() + { + $opt = new ezcBaseTestOptions(); +- try +- { +- echo $opt->properties; +- } +- catch ( ezcBasePropertyNotFoundException $e ) +- { +- return; +- } +- $this->fail( "ezcBasePropertyNotFoundException not thrown on access to forbidden property \$properties" ); ++ $this->expectException('ezcBasePropertyNotFoundException'); ++ echo $opt->properties; + } + + public function testGetOffsetAccessFailure() + { + $opt = new ezcBaseTestOptions(); +- try +- { +- echo $opt["properties"]; +- } +- catch ( ezcBasePropertyNotFoundException $e ) +- { +- return; +- } +- $this->fail( "ezcBasePropertyNotFoundException not thrown on access to forbidden property \$properties" ); ++ $this->expectException('ezcBasePropertyNotFoundException'); ++ echo $opt["properties"]; + } + + public function testSetOffsetAccessFailure() + { + $opt = new ezcBaseTestOptions(); +- try +- { +- $opt["properties"] = "foo"; +- } +- catch ( ezcBasePropertyNotFoundException $e ) +- { +- return; +- } +- $this->fail( "ezcBasePropertyNotFoundException not thrown on access to forbidden property \$properties" ); ++ $this->expectException('ezcBasePropertyNotFoundException'); ++ $opt["properties"] = "foo"; + } + + public function testConstructorWithParameters() +@@ -159,4 +140,4 @@ class ezcBaseOptionsTest extends ezcTest + } + } + +-?> +\ No newline at end of file ++?> +Index: php-zeta-base-1.9/tests/base_test.php +=================================================================== +--- php-zeta-base-1.9.orig/tests/base_test.php ++++ php-zeta-base-1.9/tests/base_test.php +@@ -23,6 +23,9 @@ + * @version //autogentag// + * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0 + */ ++ ++use PHPUnit\Framework\TestSuite; ++ + /** + * @package Base + * @subpackage Tests +@@ -316,25 +319,13 @@ class ezcBaseTest extends ezcTestCase + ezcBase::addClassRepository( __DIR__ ); + $resultArray = ezcBase::getRepositoryDirectories(); + +- if ( count( $resultArray ) != 2 ) +- { +- $this->fail( "Duplicating or missing extra autoload dirs while adding." ); +- } ++ $this->assertCount(2, $resultArray, "Duplicating or missing extra autoload dirs while adding."); + +- if ( !isset( $resultArray['ezc'] ) ) +- { +- $this->fail( "No packageDir found in result of getRepositoryDirectories()" ); +- } ++ $this->assertArrayHasKey('ezc', $resultArray, "No packageDir found in result of getRepositoryDirectories()"); + +- if ( !isset( $resultArray[0] ) || $resultArray[0]->basePath != __DIR__ ) +- { +- $this->fail( "Extra base dir '{$resultArray[0]->basePath}' is added incorrectly" ); +- } ++ $this->assertEquals(__DIR__, $resultArray[0]->basePath, "Extra base dir '{$resultArray[0]->basePath}' is added incorrectly"); + +- if ( !isset( $resultArray[0] ) || $resultArray[0]->autoloadPath != __DIR__ . '/autoload' ) +- { +- $this->fail( "Extra autoload dir '{$resultArray[0]->autoloadPath}' is added incorrectly" ); +- } ++ $this->assertEquals(__DIR__ . '/autoload', $resultArray[0]->autoloadPath, "Extra autoload dir '{$resultArray[0]->autoloadPath}' is added incorrectly"); + } + + // this test is sorta obsolete, but we keep it around for good measure +@@ -425,60 +416,47 @@ class ezcBaseTest extends ezcTestCase + { + ezcBase::addClassRepository( __DIR__ . '/test_repository', __DIR__ . '/test_repository/autoload_files' ); + ezc_autoload( 'Object' ); +- if ( !class_exists( 'Object' ) ) +- { +- $this->fail( "Autoload does not handle classes with no prefix" ); +- } ++ $this->assertTrue(class_exists( 'Object' ), "Autoload does not handle classes with no prefix"); + } + + public function testNoPrefixAutoload2() + { + ezcBase::addClassRepository( __DIR__ . '/issue15896' ); + ezc_autoload( 'ab' ); ++ $this->assertTrue(class_exists( 'ab' ), "Autoload does not handle classes with no prefix"); + } + + public function testCheckDependencyExtension() + { +- ezcBase::checkDependency( 'Tester', ezcBase::DEP_PHP_EXTENSION, 'standard' ); ++ $this->assertNull(ezcBase::checkDependency( 'Tester', ezcBase::DEP_PHP_EXTENSION, 'standard' )); + } + + public function testCheckDependencyVersion() + { +- ezcBase::checkDependency( 'Tester', ezcBase::DEP_PHP_VERSION, '5.1.1' ); ++ $this->assertNull(ezcBase::checkDependency( 'Tester', ezcBase::DEP_PHP_VERSION, '5.1.1' )); + } + + public function testInvalidClass() + { +- $this->setExpectedException( 'ezcBaseAutoloadException', "Could not find a class to file mapping for 'ezcNoSuchClass'. Searched for no_such_autoload.php, no_autoload.php, autoload.php in:" ); ++ $this->expectException( 'ezcBaseAutoloadException' ); ++ $this->expectExceptionMessage( "Could not find a class to file mapping for 'ezcNoSuchClass'. Searched for no_such_autoload.php, no_autoload.php, autoload.php in:" ); + self::assertEquals( false, class_exists( 'ezcNoSuchClass', true ) ); + } + + public function testDebug() + { +- try +- { +- class_exists( 'ezcTestingOne' ); +- self::fail( "There should have been an exception" ); +- } +- catch ( ezcBaseAutoloadException $e ) +- { +- } ++ $this->expectException('ezcBaseAutoloadException'); ++ class_exists( 'ezcTestingOne' ); + } + + public function testNoDebug() + { +- try +- { +- $options = new ezcBaseAutoloadOptions; +- $options->debug = false; +- ezcBase::setOptions( $options ); ++ $options = new ezcBaseAutoloadOptions; ++ $options->debug = false; ++ ezcBase::setOptions( $options ); + +- class_exists( 'ezcTestingOne' ); +- } +- catch ( Exception $e ) +- { +- self::fail( "There should not have been an exception. Found one: " . $e->getMessage() ); +- } ++ // No exception should be thrown. ++ $this->assertFalse(class_exists( 'ezcTestingOne' )); + } + + public function testGetInstallationPath() +@@ -539,7 +517,7 @@ class ezcBaseTest extends ezcTestCase + + public static function suite() + { +- return new PHPUnit_Framework_TestSuite("ezcBaseTest"); ++ return new TestSuite("ezcBaseTest"); + } + } + ?> +Index: php-zeta-base-1.9/tests/file_find_recursive_test.php +=================================================================== +--- php-zeta-base-1.9.orig/tests/file_find_recursive_test.php ++++ php-zeta-base-1.9/tests/file_find_recursive_test.php +@@ -25,6 +25,8 @@ + * @subpackage Tests + */ + ++use PHPUnit\Framework\TestSuite; ++ + /** + * @package Base + * @subpackage Tests +@@ -90,7 +92,7 @@ class ezcBaseFileFindRecursiveTest exten + ); + + self::assertEquals( $expected, ezcBaseFile::findRecursive( "/usr/share/php/ezc/UnitTest", array( '@^/usr/share/php/ezc/UnitTest/@' ), array( '@/docs/@', '@\.git@', '@\.swp$@' ), $stats ) ); +- self::assertEquals( array( 'size' => 23655, 'count' => 7 ), $stats ); ++ self::assertEquals( array( 'size' => 23753, 'count' => 7 ), $stats ); + } + + public function testRecursive3() +@@ -157,7 +159,7 @@ class ezcBaseFileFindRecursiveTest exten + + public static function suite() + { +- return new PHPUnit_Framework_TestSuite( "ezcBaseFileFindRecursiveTest" ); ++ return new TestSuite( "ezcBaseFileFindRecursiveTest" ); + } + } + ?> +Index: php-zeta-base-1.9/tests/metadata_pear_test.php +=================================================================== +--- php-zeta-base-1.9.orig/tests/metadata_pear_test.php ++++ php-zeta-base-1.9/tests/metadata_pear_test.php +@@ -23,6 +23,9 @@ + * @version //autogentag// + * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0 + */ ++ ++use PHPUnit\Framework\TestSuite; ++ + /** + * @package Base + * @subpackage Tests +@@ -92,7 +95,7 @@ class ezcBaseMetaDataPearTest extends ez + + public static function suite() + { +- return new PHPUnit_Framework_TestSuite( 'ezcBaseMetaDataPearTest' ); ++ return new TestSuite( 'ezcBaseMetaDataPearTest' ); + } + } + ?> diff -Nru php-zeta-base-1.9/debian/patches/series php-zeta-base-1.9/debian/patches/series --- php-zeta-base-1.9/debian/patches/series 2014-09-28 15:41:48.000000000 -0400 +++ php-zeta-base-1.9/debian/patches/series 2018-02-19 13:00:42.000000000 -0500 @@ -1,2 +1,3 @@ 0001-The-installed-package-mimicks-a-PEAR-installation.patch 0002-Adapt-UnitTest-path-for-tests.patch +0003-phpunit6-compatibility.patch diff -Nru php-zeta-base-1.9/debian/tests/control php-zeta-base-1.9/debian/tests/control --- php-zeta-base-1.9/debian/tests/control 2016-03-23 16:10:03.000000000 -0400 +++ php-zeta-base-1.9/debian/tests/control 2018-02-19 15:55:20.000000000 -0500 @@ -1,3 +1,3 @@ Test-Command: phpab -o src/autoload.php src && mkdir -p vendor && cp debian/autoload_ci.php vendor/autoload.php && phpunit Restrictions: rw-build-tree -Depends: @, imagemagick, php-zeta-unit-test, phpab, phpunit +Depends: @, composer, imagemagick, php-zeta-unit-test, phpab, phpunit, phpunit-dbunit