Skip to content
Permalink
Browse files

Fixing phpunit class aliasing

  • Loading branch information...
jeremyharris committed Jun 24, 2017
1 parent 661bec0 commit 33387ef665df5e9f461628de350e2f9590464ca8
Showing with 2 additions and 6 deletions.
  1. +0 −5 src/TestSuite/Fixture/FixtureInjector.php
  2. +2 −1 src/TestSuite/TestSuite.php
@@ -19,11 +19,6 @@
trigger_error(sprintf('Your PHPUnit Version must be at least 5.7.0 to use CakePHP Testsuite, found %s', \PHPUnit_Runner_Version::id()), E_USER_ERROR);
}
class_alias('PHPUnit_Framework_Test', 'PHPUnit\Framework\Test');
class_alias('PHPUnit_Framework_Warning', 'PHPUnit\Framework\Warning');
if (!class_exists('PHPUnit\Framework\TestSuite')) {
class_alias('PHPUnit_Framework_TestSuite', 'PHPUnit\Framework\TestSuite');
}
}
use Cake\TestSuite\TestCase;
@@ -16,11 +16,12 @@
*/
namespace Cake\TestSuite;
if (class_exists('PHPUnit_Runner_Version') && !class_exists('PHPUnit\Framework\TestSuite')) {
if (class_exists('PHPUnit_Runner_Version')) {
if (version_compare(\PHPUnit_Runner_Version::id(), '5.7', '<')) {
trigger_error(sprintf('Your PHPUnit Version must be at least 5.7.0 to use CakePHP Testsuite, found %s', \PHPUnit_Runner_Version::id()), E_USER_ERROR);
}
class_alias('PHPUnit_Framework_TestSuite', 'PHPUnit\Framework\TestSuite');
class_alias('PHPUnit_Framework_AssertionFailedError', 'PHPUnit\Framework\AssertionFailedError');
}
use Cake\Filesystem\Folder;

0 comments on commit 33387ef

Please sign in to comment.
You can’t perform that action at this time.