-
Notifications
You must be signed in to change notification settings - Fork 38
Conversation
@@ -14,7 +14,7 @@ | |||
}, | |||
"require": { | |||
"php": "^5.6 || ^7.0", | |||
"phpunit/phpunit": "^4.0 || ^5.0", | |||
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will not work with the current version of zend-test
, because in PHPUnit 6 the class PHPUnit_Framework_TestCase
no longer exists.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can change the code with class_alias:
use PHPUnit\Framework\TestCase;
if (! class_exists(TestCase::class)) {
class_alias(\PHPUnit_Framework_TestCase::class, TestCase::class);
}
abstract class AbstractControllerTestCase extends TestCase
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Go for it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done ;)
@samsonasik I think this should target |
@Ocramius done ;) |
@samsonasik needs a rebase now :P |
@Ocramius done ;), rebased ;) |
👍 thanks! |
@samsonasik and @Ocramius |
use Zend\Router\RouteMatch; | ||
use Zend\Test\PHPUnit\Controller\AbstractConsoleControllerTestCase; | ||
|
||
if (! class_exists(ExpectationFailedException::class)) { | ||
class_alias(\PHPUnit_Framework_ExpectationFailedException::class, ExpectationFailedException::class); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ugh, wish I'd had a chance to review before merge.
All these class_alias
calls should likely be in a single file that is added via an autoload_dev
section of the composer.json
. That way the aliases are created when needed, and outside the class file declarations themselves.
No description provided.