Adjust PHPUnit class_alias check to also check for namespaced class

This commit is contained in:
Gawain Lynch 2017-05-27 12:34:25 +02:00
parent 4e8f403a7c
commit 7ba3afd859
No known key found for this signature in database
GPG Key ID: 508C10F858FD246E
3 changed files with 3 additions and 3 deletions

View File

@ -16,7 +16,7 @@ use PHPUnit\Framework\Test;
use PHPUnit\Framework\TestSuite;
use PHPUnit\Framework\Warning;
if (class_exists('PHPUnit_Framework_BaseTestListener')) {
if (class_exists('PHPUnit_Framework_BaseTestListener') && !class_exists('PHPUnit\Framework\BaseTestListener')) {
class_alias('Symfony\Bridge\PhpUnit\Legacy\SymfonyTestsListener', 'Symfony\Bridge\PhpUnit\SymfonyTestsListener');
return;

View File

@ -13,7 +13,7 @@ namespace Symfony\Bridge\PhpUnit\TextUI;
use PHPUnit\TextUI\Command as BaseCommand;
if (class_exists('PHPUnit_TextUI_Command')) {
if (class_exists('PHPUnit_TextUI_Command') && !class_exists('PHPUnit\TextUI\Command')) {
class_alias('Symfony\Bridge\PhpUnit\Legacy\Command', 'Symfony\Bridge\PhpUnit\TextUI\Command');
return;

View File

@ -14,7 +14,7 @@ namespace Symfony\Bridge\PhpUnit\TextUI;
use PHPUnit\TextUI\TestRunner as BaseRunner;
use Symfony\Bridge\PhpUnit\SymfonyTestsListener;
if (class_exists('PHPUnit_TextUI_Command')) {
if (class_exists('PHPUnit_TextUI_Command') && !class_exists('PHPUnit\TextUI\Command')) {
class_alias('Symfony\Bridge\PhpUnit\Legacy\TestRunner', 'Symfony\Bridge\PhpUnit\TextUI\TestRunner');
return;