diff -Nru phpunit-7.3.1/ChangeLog-6.5.md phpunit-7.3.2/ChangeLog-6.5.md --- phpunit-7.3.1/ChangeLog-6.5.md 2018-08-07 06:44:28.000000000 +0000 +++ phpunit-7.3.2/ChangeLog-6.5.md 2018-08-22 06:39:21.000000000 +0000 @@ -2,6 +2,15 @@ All notable changes of the PHPUnit 6.5 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. +## [6.5.12] - 2018-08-22 + +* Fixed [#3248](https://github.com/sebastianbergmann/phpunit/issues/3248) and [#3233](https://github.com/sebastianbergmann/phpunit/issues/3233): `phpunit.xsd` dictates element order where it should not +* Fixed [#3251](https://github.com/sebastianbergmann/phpunit/issues/3251): TeamCity result logger is missing test duration information + +## [6.5.11] - 2018-08-07 + +* Fixed [#3219](https://github.com/sebastianbergmann/phpunit/issues/3219): `getMockFromWsdl()` generates invalid PHP code when WSDL filename contains special characters + ## [6.5.10] - 2018-08-03 ### Fixed @@ -76,6 +85,8 @@ * Fixed [#2654](https://github.com/sebastianbergmann/phpunit/issues/2654): Problems with `assertJsonStringEqualsJsonString()` * Fixed [#2810](https://github.com/sebastianbergmann/phpunit/pull/2810): Code Coverage for PHPT tests does not work +[6.5.12]: https://github.com/sebastianbergmann/phpunit/compare/6.5.11...6.5.12 +[6.5.11]: https://github.com/sebastianbergmann/phpunit/compare/6.5.10...6.5.11 [6.5.10]: https://github.com/sebastianbergmann/phpunit/compare/6.5.9...6.5.10 [6.5.9]: https://github.com/sebastianbergmann/phpunit/compare/6.5.8...6.5.9 [6.5.8]: https://github.com/sebastianbergmann/phpunit/compare/6.5.7...6.5.8 diff -Nru phpunit-7.3.1/ChangeLog-7.3.md phpunit-7.3.2/ChangeLog-7.3.md --- phpunit-7.3.1/ChangeLog-7.3.md 2018-08-07 06:44:28.000000000 +0000 +++ phpunit-7.3.2/ChangeLog-7.3.md 2018-08-22 06:39:21.000000000 +0000 @@ -2,6 +2,14 @@ All notable changes of the PHPUnit 7.3 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. +## [7.3.2] - 2018-08-22 + +### Fixed + +* Fixed [#3219](https://github.com/sebastianbergmann/phpunit/issues/3219): `getMockFromWsdl()` generates invalid PHP code when WSDL filename contains special characters +* Fixed [#3248](https://github.com/sebastianbergmann/phpunit/issues/3248) and [#3233](https://github.com/sebastianbergmann/phpunit/issues/3233): `phpunit.xsd` dictates element order where it should not +* Fixed [#3251](https://github.com/sebastianbergmann/phpunit/issues/3251): TeamCity result logger is missing test duration information + ## [7.3.1] - 2018-08-07 ### Changed @@ -37,6 +45,7 @@ * Fixed [#3222](https://github.com/sebastianbergmann/phpunit/pull/3222): Priority of `@covers` and `@coversNothing` is wrong * Fixed [#3225](https://github.com/sebastianbergmann/phpunit/issues/3225): `coverage-php` missing from `phpunit.xsd` +[7.3.2]: https://github.com/sebastianbergmann/phpunit/compare/7.3.1...7.3.2 [7.3.1]: https://github.com/sebastianbergmann/phpunit/compare/7.3.0...7.3.1 [7.3.0]: https://github.com/sebastianbergmann/phpunit/compare/7.2...7.3.0 diff -Nru phpunit-7.3.1/debian/changelog phpunit-7.3.2/debian/changelog --- phpunit-7.3.1/debian/changelog 2018-08-07 15:03:20.000000000 +0000 +++ phpunit-7.3.2/debian/changelog 2018-08-24 01:18:33.000000000 +0000 @@ -1,3 +1,12 @@ +phpunit (7.3.2-1) unstable; urgency=medium + + * Team upload + + [ Sebastian Bergmann ] + * Prepare release + + -- David Prévot Thu, 23 Aug 2018 15:18:33 -1000 + phpunit (7.3.1-1) unstable; urgency=medium * Team upload diff -Nru phpunit-7.3.1/phive.xml phpunit-7.3.2/phive.xml --- phpunit-7.3.1/phive.xml 2018-08-07 06:44:28.000000000 +0000 +++ phpunit-7.3.2/phive.xml 2018-08-22 06:39:21.000000000 +0000 @@ -1,7 +1,7 @@ - + diff -Nru phpunit-7.3.1/phpunit.xsd phpunit-7.3.2/phpunit.xsd --- phpunit-7.3.1/phpunit.xsd 2018-08-07 06:44:28.000000000 +0000 +++ phpunit-7.3.2/phpunit.xsd 2018-08-22 06:39:21.000000000 +0000 @@ -18,12 +18,14 @@ - - - - - - + + + + + + + + @@ -82,15 +84,17 @@ - - - - - - - - - + + + + + + + + + + + @@ -153,8 +157,10 @@ - - + + + + diff -Nru phpunit-7.3.1/src/Framework/TestCase.php phpunit-7.3.2/src/Framework/TestCase.php --- phpunit-7.3.1/src/Framework/TestCase.php 2018-08-07 06:44:28.000000000 +0000 +++ phpunit-7.3.2/src/Framework/TestCase.php 2018-08-22 06:39:21.000000000 +0000 @@ -1447,7 +1447,8 @@ protected function getMockFromWsdl($wsdlFile, $originalClassName = '', $mockClassName = '', array $methods = [], $callOriginalConstructor = true, array $options = []): MockObject { if ($originalClassName === '') { - $originalClassName = \pathinfo(\basename(\parse_url($wsdlFile)['path']), \PATHINFO_FILENAME); + $fileName = \pathinfo(\basename(\parse_url($wsdlFile)['path']), \PATHINFO_FILENAME); + $originalClassName = \preg_replace('/[^a-zA-Z0-9_]/', '', $fileName); } if (!\class_exists($originalClassName)) { diff -Nru phpunit-7.3.1/src/Runner/Version.php phpunit-7.3.2/src/Runner/Version.php --- phpunit-7.3.1/src/Runner/Version.php 2018-08-07 06:44:28.000000000 +0000 +++ phpunit-7.3.2/src/Runner/Version.php 2018-08-22 06:39:21.000000000 +0000 @@ -30,7 +30,7 @@ } if (self::$version === null) { - $version = new VersionId('7.3.1', \dirname(__DIR__, 2)); + $version = new VersionId('7.3.2', \dirname(__DIR__, 2)); self::$version = $version->getVersion(); } diff -Nru phpunit-7.3.1/src/Util/Log/TeamCity.php phpunit-7.3.2/src/Util/Log/TeamCity.php --- phpunit-7.3.1/src/Util/Log/TeamCity.php 2018-08-07 06:44:28.000000000 +0000 +++ phpunit-7.3.2/src/Util/Log/TeamCity.php 2018-08-22 06:39:21.000000000 +0000 @@ -60,9 +60,10 @@ $this->printEvent( 'testFailed', [ - 'name' => $test->getName(), - 'message' => self::getMessage($t), - 'details' => self::getDetails($t), + 'name' => $test->getName(), + 'message' => self::getMessage($t), + 'details' => self::getDetails($t), + 'duration' => self::toMilliseconds($time), ] ); } @@ -77,9 +78,10 @@ $this->printEvent( 'testFailed', [ - 'name' => $test->getName(), - 'message' => self::getMessage($e), - 'details' => self::getDetails($e) + 'name' => $test->getName(), + 'message' => self::getMessage($e), + 'details' => self::getDetails($e), + 'duration' => self::toMilliseconds($time), ] ); } @@ -92,9 +94,10 @@ public function addFailure(Test $test, AssertionFailedError $e, float $time): void { $parameters = [ - 'name' => $test->getName(), - 'message' => self::getMessage($e), - 'details' => self::getDetails($e), + 'name' => $test->getName(), + 'message' => self::getMessage($e), + 'details' => self::getDetails($e), + 'duration' => self::toMilliseconds($time), ]; if ($e instanceof ExpectationFailedException) { @@ -129,7 +132,7 @@ */ public function addIncompleteTest(Test $test, \Throwable $t, float $time): void { - $this->printIgnoredTest($test->getName(), $t); + $this->printIgnoredTest($test->getName(), $t, $time); } /** @@ -153,21 +156,22 @@ if ($this->startedTestName !== $testName) { $this->startTest($test); - $this->printIgnoredTest($testName, $t); + $this->printIgnoredTest($testName, $t, $time); $this->endTest($test, $time); } else { - $this->printIgnoredTest($testName, $t); + $this->printIgnoredTest($testName, $t, $time); } } - public function printIgnoredTest($testName, \Throwable $t): void + public function printIgnoredTest($testName, \Throwable $t, float $time): void { $this->printEvent( 'testIgnored', [ - 'name' => $testName, - 'message' => self::getMessage($t), - 'details' => self::getDetails($t), + 'name' => $testName, + 'message' => self::getMessage($t), + 'details' => self::getDetails($t), + 'duration' => self::toMilliseconds($time), ] ); } @@ -273,7 +277,7 @@ 'testFinished', [ 'name' => $test->getName(), - 'duration' => (int) (\round($time, 2) * 1000) + 'duration' => self::toMilliseconds($time) ] ); } @@ -376,4 +380,12 @@ return $reflectionClass->getFileName(); } + + /** + * @param float $time microseconds + */ + private static function toMilliseconds(float $time): int + { + return \round($time * 1000); + } } diff -Nru "/tmp/tmpwmKjQo/WxM4EGivAp/phpunit-7.3.1/tests/_files/Go ogle-Sea.rch.wsdl" "/tmp/tmpwmKjQo/Qo3Ok600UW/phpunit-7.3.2/tests/_files/Go ogle-Sea.rch.wsdl" --- "/tmp/tmpwmKjQo/WxM4EGivAp/phpunit-7.3.1/tests/_files/Go ogle-Sea.rch.wsdl" 1970-01-01 00:00:00.000000000 +0000 +++ "/tmp/tmpwmKjQo/Qo3Ok600UW/phpunit-7.3.2/tests/_files/Go ogle-Sea.rch.wsdl" 2018-08-22 06:39:21.000000000 +0000 @@ -0,0 +1,198 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru phpunit-7.3.1/tests/Framework/Constraint/ArraySubsetTest.php phpunit-7.3.2/tests/Framework/Constraint/ArraySubsetTest.php --- phpunit-7.3.1/tests/Framework/Constraint/ArraySubsetTest.php 2018-08-07 06:44:28.000000000 +0000 +++ phpunit-7.3.2/tests/Framework/Constraint/ArraySubsetTest.php 2018-08-22 06:39:21.000000000 +0000 @@ -84,4 +84,3 @@ } } } - diff -Nru phpunit-7.3.1/tests/Framework/MockObject/MockObjectTest.php phpunit-7.3.2/tests/Framework/MockObject/MockObjectTest.php --- phpunit-7.3.1/tests/Framework/MockObject/MockObjectTest.php 2018-08-07 06:44:28.000000000 +0000 +++ phpunit-7.3.2/tests/Framework/MockObject/MockObjectTest.php 2018-08-22 06:39:21.000000000 +0000 @@ -942,6 +942,18 @@ } /** + * @see https://github.com/sebastianbergmann/phpunit/issues/2573 + * @ticket 2573 + * @requires extension soap + */ + public function testCreateMockOfWsdlFileWithSpecialChars() + { + $mock = $this->getMockFromWsdl(__DIR__ . '/_fixture/Go ogle-Sea.rch.wsdl'); + + $this->assertStringStartsWith('Mock_GoogleSearch_', \get_class($mock)); + } + + /** * @see https://github.com/sebastianbergmann/phpunit-mock-objects/issues/156 * @ticket 156 */ diff -Nru phpunit-7.3.1/tests/TextUI/teamcity-inner-exceptions.phpt phpunit-7.3.2/tests/TextUI/teamcity-inner-exceptions.phpt --- phpunit-7.3.1/tests/TextUI/teamcity-inner-exceptions.phpt 2018-08-07 06:44:28.000000000 +0000 +++ phpunit-7.3.2/tests/TextUI/teamcity-inner-exceptions.phpt 2018-08-22 06:39:21.000000000 +0000 @@ -19,13 +19,13 @@ ##teamcity[testStarted name='testPrintingChildException' locationHint='php_qn://%s%etests%e_files%eExceptionStackTest.php::\ExceptionStackTest::testPrintingChildException' flowId='%d'] -##teamcity[testFailed name='testPrintingChildException' message='Child exception|nmessage|nFailed asserting that two arrays are equal.|n--- Expected|n+++ Actual|n@@ @@|n Array (|n- 0 => 1|n+ 0 => 2|n )|n' details=' %s_files%eExceptionStackTest.php:%d|n |n Caused by|n message|n Failed asserting that two arrays are equal.|n --- Expected|n +++ Actual|n @@ @@|n Array (|n - 0 => 1|n + 0 => 2|n )|n |n %s_files%eExceptionStackTest.php:%d|n ' flowId='%d'] +##teamcity[testFailed name='testPrintingChildException' message='Child exception|nmessage|nFailed asserting that two arrays are equal.|n--- Expected|n+++ Actual|n@@ @@|n Array (|n- 0 => 1|n+ 0 => 2|n )|n' details=' %s_files%eExceptionStackTest.php:%d|n |n Caused by|n message|n Failed asserting that two arrays are equal.|n --- Expected|n +++ Actual|n @@ @@|n Array (|n - 0 => 1|n + 0 => 2|n )|n |n %s_files%eExceptionStackTest.php:%d|n ' duration='%d' flowId='%d'] ##teamcity[testFinished name='testPrintingChildException' duration='%d' flowId='%d'] ##teamcity[testStarted name='testNestedExceptions' locationHint='php_qn://%s%etests%e_files%eExceptionStackTest.php::\ExceptionStackTest::testNestedExceptions' flowId='%d'] -##teamcity[testFailed name='testNestedExceptions' message='Exception : One' details=' %s%etests%e_files%eExceptionStackTest.php:%d|n |n Caused by|n InvalidArgumentException: Two|n |n %s%etests%e_files%eExceptionStackTest.php:%d|n |n Caused by|n Exception: Three|n |n %s%etests%e_files%eExceptionStackTest.php:%d|n ' flowId='%d'] +##teamcity[testFailed name='testNestedExceptions' message='Exception : One' details=' %s%etests%e_files%eExceptionStackTest.php:%d|n |n Caused by|n InvalidArgumentException: Two|n |n %s%etests%e_files%eExceptionStackTest.php:%d|n |n Caused by|n Exception: Three|n |n %s%etests%e_files%eExceptionStackTest.php:%d|n ' duration='%d' flowId='%d'] ##teamcity[testFinished name='testNestedExceptions' duration='%d' flowId='%d']