Skip to content

Commit

Permalink
minor #36568 [PhpUnitBridge] Improve dirname usage (Jean85)
Browse files Browse the repository at this point in the history
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
-------

e721cfd Improve dirname usage
  • Loading branch information
fabpot committed Apr 25, 2020
2 parents fe5eacd + e721cfd commit b3cdf5c
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -49,7 +49,7 @@ public function __construct(array $mockedNamespaces = array())
\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;
}
Expand Down

0 comments on commit b3cdf5c

Please sign in to comment.