bug #14854 [Bridge\PhpUnit] Fix composer installed phpunit detection (nicolas-grekas)

This PR was merged into the 2.7 branch.

Discussion
----------

[Bridge\PhpUnit] Fix composer installed phpunit detection

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #14849
| License       | MIT
| Doc PR        | -

Commits
-------

1b690c1 [Bridge\PhpUnit] Fix composer installed phpunit detection
This commit is contained in:
Fabien Potencier 2015-06-04 15:39:33 +02:00
commit c2127a3992
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@ use Doctrine\Common\Annotations\AnnotationRegistry;
use Symfony\Bridge\PhpUnit\DeprecationErrorHandler;
// Detect if we're loaded by an actual run of phpunit
if (!class_exists('PHPUnit_TextUI_Command', false)) {
if (!defined('PHPUNIT_COMPOSER_INSTALL') && !class_exists('PHPUnit_TextUI_Command', false)) {
return;
}