minor #32920 [PhpUnitBridge] fix internal annotation (nicolas-grekas)
This PR was merged into the 4.4 branch.
Discussion
----------
[PhpUnitBridge] fix internal annotation
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This should fix tests. It may require emptying the cache on Travis.
Commits
-------
f19b0abe0d
[PhpUnitBridge] fix internal annotation
This commit is contained in:
commit
884669b83b
@ -17,7 +17,7 @@ use PHPUnit\Framework\Constraint\StringContains;
|
|||||||
use PHPUnit\Framework\Constraint\TraversableContains;
|
use PHPUnit\Framework\Constraint\TraversableContains;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal
|
* This trait is @internal
|
||||||
*/
|
*/
|
||||||
trait PolyfillAssertTrait
|
trait PolyfillAssertTrait
|
||||||
{
|
{
|
||||||
|
@ -15,7 +15,7 @@ use PHPUnit\Framework\MockObject\MockObject;
|
|||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal
|
* This trait is @internal
|
||||||
*/
|
*/
|
||||||
trait PolyfillTestCaseTrait
|
trait PolyfillTestCaseTrait
|
||||||
{
|
{
|
||||||
|
@ -156,12 +156,6 @@ if (!file_exists("$PHPUNIT_DIR/$PHPUNIT_VERSION_DIR/phpunit") || $configurationH
|
|||||||
$alteredCode = preg_replace('/abstract class (?:Assert|PHPUnit_Framework_Assert)[^\{]+\{/', '$0 '.PHP_EOL." use \Symfony\Bridge\PhpUnit\Legacy\PolyfillAssertTrait;", $alteredCode, 1);
|
$alteredCode = preg_replace('/abstract class (?:Assert|PHPUnit_Framework_Assert)[^\{]+\{/', '$0 '.PHP_EOL." use \Symfony\Bridge\PhpUnit\Legacy\PolyfillAssertTrait;", $alteredCode, 1);
|
||||||
file_put_contents($alteredFile, $alteredCode);
|
file_put_contents($alteredFile, $alteredCode);
|
||||||
|
|
||||||
// remove internal annotation from polyfill
|
|
||||||
foreach (array('PolyfillTestCaseTrait', 'PolyfillAssertTrait') as $polyfill) {
|
|
||||||
$traitFile = "./vendor/symfony/phpunit-bridge/Legacy/$polyfill.php";
|
|
||||||
file_put_contents($traitFile, str_replace(' * @internal', '', file_get_contents($traitFile)));
|
|
||||||
}
|
|
||||||
|
|
||||||
file_put_contents('phpunit', <<<'EOPHP'
|
file_put_contents('phpunit', <<<'EOPHP'
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user