minor #36568 [PhpUnitBridge] Improve dirname usage (Jean85)

This PR was merged into the 3.4 branch.

Discussion
----------

[PhpUnitBridge] Improve dirname usage

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #36499
| License       | MIT

This is a very small performance improvement on top of #36539

Commits
-------

e721cfd65c Improve dirname usage
This commit is contained in:
Fabien Potencier 2020-04-25 14:02:39 +02:00
commit b3cdf5c989

View File

@ -49,7 +49,7 @@ class SymfonyTestsListenerTrait
\PHPUnit_Util_Blacklist::$blacklistedClassNames[__CLASS__] = 2;
} elseif (method_exists(Blacklist::class, 'addDirectory')) {
(new BlackList())->getBlacklistedDirectories();
Blacklist::addDirectory(\dirname(\dirname((new \ReflectionClass(__CLASS__))->getFileName())));
Blacklist::addDirectory(\dirname((new \ReflectionClass(__CLASS__))->getFileName(), 2));
} else {
Blacklist::$blacklistedClassNames[__CLASS__] = 2;
}