bug #36673 [PhpUnitBridge] fix PHP 5.3 compat again (nicolas-grekas)
This PR was merged into the 3.4 branch.
Discussion
----------
[PhpUnitBridge] fix PHP 5.3 compat again
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Commits
-------
065a8cee5f
[PhpUnitBridge] fix PHP 5.3 compat again
This commit is contained in:
commit
119b81035b
@ -48,8 +48,10 @@ class SymfonyTestsListenerTrait
|
|||||||
if (class_exists('PHPUnit_Util_Blacklist')) {
|
if (class_exists('PHPUnit_Util_Blacklist')) {
|
||||||
\PHPUnit_Util_Blacklist::$blacklistedClassNames[__CLASS__] = 2;
|
\PHPUnit_Util_Blacklist::$blacklistedClassNames[__CLASS__] = 2;
|
||||||
} elseif (method_exists('PHPUnit\Util\Blacklist', 'addDirectory')) {
|
} elseif (method_exists('PHPUnit\Util\Blacklist', 'addDirectory')) {
|
||||||
|
eval(" // PHP 5.3 compat
|
||||||
(new BlackList())->getBlacklistedDirectories();
|
(new BlackList())->getBlacklistedDirectories();
|
||||||
Blacklist::addDirectory(\dirname((new \ReflectionClass(__CLASS__))->getFileName(), 2));
|
Blacklist::addDirectory(\dirname((new \ReflectionClass(__CLASS__))->getFileName(), 2));
|
||||||
|
");
|
||||||
} else {
|
} else {
|
||||||
Blacklist::$blacklistedClassNames[__CLASS__] = 2;
|
Blacklist::$blacklistedClassNames[__CLASS__] = 2;
|
||||||
}
|
}
|
||||||
|
@ -129,9 +129,11 @@ if (class_exists('PHPUnit_Util_Blacklist')) {
|
|||||||
PHPUnit_Util_Blacklist::$blacklistedClassNames['SymfonyBlacklistPhpunit'] = 1;
|
PHPUnit_Util_Blacklist::$blacklistedClassNames['SymfonyBlacklistPhpunit'] = 1;
|
||||||
PHPUnit_Util_Blacklist::$blacklistedClassNames['SymfonyBlacklistSimplePhpunit'] = 1;
|
PHPUnit_Util_Blacklist::$blacklistedClassNames['SymfonyBlacklistSimplePhpunit'] = 1;
|
||||||
} elseif (method_exists('PHPUnit\Util\Blacklist', 'addDirectory')) {
|
} elseif (method_exists('PHPUnit\Util\Blacklist', 'addDirectory')) {
|
||||||
|
eval(" // PHP 5.3 compat
|
||||||
(new PHPUnit\Util\BlackList())->getBlacklistedDirectories();
|
(new PHPUnit\Util\BlackList())->getBlacklistedDirectories();
|
||||||
PHPUnit\Util\Blacklist::addDirectory(dirname((new ReflectionClass('SymfonyBlacklistPhpunit'))->getFileName()));
|
PHPUnit\Util\Blacklist::addDirectory(dirname((new ReflectionClass('SymfonyBlacklistPhpunit'))->getFileName()));
|
||||||
PHPUnit\Util\Blacklist::addDirectory(dirname((new ReflectionClass('SymfonyBlacklistSimplePhpunit'))->getFileName()));
|
PHPUnit\Util\Blacklist::addDirectory(dirname((new ReflectionClass('SymfonyBlacklistSimplePhpunit'))->getFileName()));
|
||||||
|
");
|
||||||
} else {
|
} else {
|
||||||
PHPUnit\Util\Blacklist::$blacklistedClassNames['SymfonyBlacklistPhpunit'] = 1;
|
PHPUnit\Util\Blacklist::$blacklistedClassNames['SymfonyBlacklistPhpunit'] = 1;
|
||||||
PHPUnit\Util\Blacklist::$blacklistedClassNames['SymfonyBlacklistSimplePhpunit'] = 1;
|
PHPUnit\Util\Blacklist::$blacklistedClassNames['SymfonyBlacklistSimplePhpunit'] = 1;
|
||||||
|
Reference in New Issue
Block a user