[PhpUnitBridge] fix internal annotation
This commit is contained in:
parent
37265de54d
commit
f19b0abe0d
@ -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