-
-
Notifications
You must be signed in to change notification settings - Fork 3
Tests with multiple zf versions #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tests with multiple zf versions #12
Conversation
// Required to initialize application | ||
'Zend\Router', | ||
], | ||
if (class_exists('Zend\Router\Module')) { |
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.
I think this is fine as we are running inside our tests scope there Zend\Router\Module
should always be defined.
So no need to check, or am I missing something?
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.
When you install zend mvc 2.x there is no explicit zend router module. With zend mvc 3.x there is an explicit zend router module which must be added to your list of modules.
This makes it quite difficult to support both versions with the same tests.
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.
Didn't check that one.. fine with me then :)
@@ -10,7 +10,12 @@ | |||
}, | |||
"require-dev": { | |||
"phpunit/phpunit": "^5.0 | ^6.0", | |||
"zendframework/zend-mvc": "^2.0 | ^3.0" | |||
"zendframework/zend-mvc": "^2.0 | ^3.0", | |||
"zendframework/zend-view": "^2.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.
I added zend-mvc
a week back. So its fine if there are more of them to execute tests properly
This runs 3 travis builds with zend version 2 for servicemanager and mvc composer package.
One ugly part is, that it needs zend-view, zend-serializer, zend-log, zend-console and zend-i18n as requirement to initialize the application. We could either add this via travis.yml if we want to keep our composer.json clean. But in this case you can not execute the tests locally for zend version 2.
Any suggestions?
Another thought is to provide an own ServiceListener instance just for testing purposes which does not add all plugin managers.