Skip to content

Commit

Permalink
Closes #4412
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Aug 10, 2020
1 parent 0bc9739 commit d0ce1be
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
7 changes: 7 additions & 0 deletions ChangeLog-9.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes of the PHPUnit 9.3 release series are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles.

## [9.3.5] - 2020-MM-DD

### Fixed

* [#4412](https://github.com/sebastianbergmann/phpunit/issues/4412): Code Coverage does not work for isolated test when PHAR is used

## [9.3.4] - 2020-08-10

### Added
Expand Down Expand Up @@ -200,6 +206,7 @@ If you have an XML configuration file that validates against [PHPUnit 9.2's XML
* [#4396](https://github.com/sebastianbergmann/phpunit/issues/4396): Deprecate confusing parameter options for XML assertions
* The `cacheTokens` attribute is no longer supported in XML configuration files

[9.3.5]: https://github.com/sebastianbergmann/phpunit/compare/9.3.4...9.3
[9.3.4]: https://github.com/sebastianbergmann/phpunit/compare/9.3.3...9.3.4
[9.3.3]: https://github.com/sebastianbergmann/phpunit/compare/9.3.2...9.3.3
[9.3.2]: https://github.com/sebastianbergmann/phpunit/compare/9.3.1...9.3.2
Expand Down
7 changes: 5 additions & 2 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -433,9 +433,12 @@
<arg path="${basedir}/build/tmp/phar" />
</exec>

<replace file="${basedir}/build/tmp/phar-scoped/phpunit/Util/PHP/Template/PhptTestCase.tpl" token="SebastianBergmann\CodeCoverage\CodeCoverage" value="PHPUnit\SebastianBergmann\CodeCoverage\CodeCoverage"/>
<replace file="${basedir}/build/tmp/phar-scoped/phpunit/Util/PHP/Template/TestCaseClass.tpl" token="SebastianBergmann\CodeCoverage\CodeCoverage" value="PHPUnit\SebastianBergmann\CodeCoverage\CodeCoverage"/>
<replace file="${basedir}/build/tmp/phar-scoped/phpunit/Util/PHP/Template/PhptTestCase.tpl" token="SebastianBergmann\CodeCoverage\CodeCoverage" value="PHPUnit\SebastianBergmann\CodeCoverage\CodeCoverage"/>
<replace file="${basedir}/build/tmp/phar-scoped/phpunit/Util/PHP/Template/PhptTestCase.tpl" token="SebastianBergmann\CodeCoverage\Driver\Driver" value="PHPUnit\SebastianBergmann\CodeCoverage\Driver\Driver"/>
<replace file="${basedir}/build/tmp/phar-scoped/phpunit/Util/PHP/Template/TestCaseClass.tpl" token="SebastianBergmann\CodeCoverage\CodeCoverage" value="PHPUnit\SebastianBergmann\CodeCoverage\CodeCoverage"/>
<replace file="${basedir}/build/tmp/phar-scoped/phpunit/Util/PHP/Template/TestCaseClass.tpl" token="SebastianBergmann\CodeCoverage\Driver\Driver" value="PHPUnit\SebastianBergmann\CodeCoverage\Driver\Driver"/>
<replace file="${basedir}/build/tmp/phar-scoped/phpunit/Util/PHP/Template/TestCaseMethod.tpl" token="SebastianBergmann\CodeCoverage\CodeCoverage" value="PHPUnit\SebastianBergmann\CodeCoverage\CodeCoverage"/>
<replace file="${basedir}/build/tmp/phar-scoped/phpunit/Util/PHP/Template/TestCaseMethod.tpl" token="SebastianBergmann\CodeCoverage\Driver\Driver" value="PHPUnit\SebastianBergmann\CodeCoverage\Driver\Driver"/>
</target>

<target name="-phar-determine-version">
Expand Down
9 changes: 9 additions & 0 deletions tests/phar/tests/GreeterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,13 @@ public function testGreets(): void
{
$this->assertSame('Hello world!', (new Greeter)->greet());
}

/**
* @runInSeparateProcess
* @ticket https://github.com/sebastianbergmann/phpunit/issues/4412
*/
public function testGreetsInIsolation(): void
{
$this->assertSame('Hello world!', (new Greeter)->greet());
}
}

0 comments on commit d0ce1be

Please sign in to comment.