File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
src/Symfony/Bridge/PhpUnit Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 17
17
use PHPUnit \Framework \TestSuite ;
18
18
use PHPUnit \Runner \BaseTestRunner ;
19
19
use PHPUnit \Util \Blacklist ;
20
+ use PHPUnit \Util \ExcludeList ;
20
21
use PHPUnit \Util \Test ;
21
22
use Symfony \Bridge \PhpUnit \ClockMock ;
22
23
use Symfony \Bridge \PhpUnit \DnsMock ;
@@ -48,7 +49,10 @@ class SymfonyTestsListenerTrait
48
49
*/
49
50
public function __construct (array $ mockedNamespaces = [])
50
51
{
51
- if (method_exists (Blacklist::class, 'addDirectory ' )) {
52
+ if (class_exists (ExcludeList::class)) {
53
+ (new ExcludeList ())->getExcludedDirectories ();
54
+ ExcludeList::addDirectory (\dirname ((new \ReflectionClass (__CLASS__ ))->getFileName (), 2 ));
55
+ } elseif (method_exists (Blacklist::class, 'addDirectory ' )) {
52
56
(new BlackList ())->getBlacklistedDirectories ();
53
57
Blacklist::addDirectory (\dirname ((new \ReflectionClass (__CLASS__ ))->getFileName (), 2 ));
54
58
} else {
Original file line number Diff line number Diff line change 193
193
'requires ' => ['php ' => '* ' ],
194
194
];
195
195
196
- if (1 === \ count ($ info ['versions ' ])) {
196
+ if (1 === count ($ info ['versions ' ])) {
197
197
$ passthruOrFail ("$ COMPOSER create-project --ignore-platform-reqs --no-install --prefer-dist --no-scripts --no-plugins --no-progress -s dev phpunit/phpunit $ PHPUNIT_VERSION_DIR \"$ PHPUNIT_VERSION .* \"" );
198
198
} else {
199
199
$ passthruOrFail ("$ COMPOSER create-project --ignore-platform-reqs --no-install --prefer-dist --no-scripts --no-plugins --no-progress phpunit/phpunit $ PHPUNIT_VERSION_DIR \"$ PHPUNIT_VERSION .* \"" );
254
254
if (!class_exists('SymfonyBlacklistPhpunit', false)) {
255
255
class SymfonyBlacklistPhpunit {}
256
256
}
257
- if (method_exists('PHPUnit\Util\Blacklist', 'addDirectory')) {
257
+ if (method_exists('PHPUnit\Util\ExcludeList', 'addDirectory')) {
258
+ (new PHPUnit\Util\Excludelist())->getExcludedDirectories();
259
+ PHPUnit\Util\ExcludeList::addDirectory(\dirname((new \ReflectionClass('SymfonyBlacklistPhpunit'))->getFileName()));
260
+ PHPUnit\Util\ExcludeList::addDirectory(\dirname((new \ReflectionClass('SymfonyBlacklistSimplePhpunit'))->getFileName()));
261
+ } elseif (method_exists('PHPUnit\Util\Blacklist', 'addDirectory')) {
258
262
(new PHPUnit\Util\BlackList())->getBlacklistedDirectories();
259
263
PHPUnit\Util\Blacklist::addDirectory(\dirname((new \ReflectionClass('SymfonyBlacklistPhpunit'))->getFileName()));
260
264
PHPUnit\Util\Blacklist::addDirectory(\dirname((new \ReflectionClass('SymfonyBlacklistSimplePhpunit'))->getFileName()));
You can’t perform that action at this time.
0 commit comments