Skip to content

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

Merged
merged 4 commits into from
Dec 5, 2017

Conversation

reinfi
Copy link
Contributor

@reinfi reinfi commented Dec 1, 2017

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.

// Required to initialize application
'Zend\Router',
],
if (class_exists('Zend\Router\Module')) {
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

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",
Copy link
Member

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

@icanhazstring icanhazstring merged commit f99e056 into goaop:master Dec 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants