Skip to content

Commit f99e056

Browse files
Merge pull request #12 from reinfi/tests-with-multiple-zf-versions
Tests with multiple zf versions
2 parents bb91826 + 167b451 commit f99e056

File tree

3 files changed

+22
-7
lines changed

3 files changed

+22
-7
lines changed

.travis.yml

+8
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,18 @@ php:
66
- 7.1
77

88
matrix:
9+
include:
10+
- php: 5.6
11+
env: ZF_VERSION=2
12+
- php: 7.0
13+
env: ZF_VERSION=2
14+
- php: 7.1
15+
env: ZF_VERSION=2
916
fast_finish: true
1017

1118
before_install:
1219
- phpenv config-rm xdebug.ini
20+
- if [ "$ZF_VERSION" = "2" ]; then sed 's/ | ^3.0//g' composer.json > composer_v27.json; rm composer.json; mv composer_v27.json composer.json; fi
1321

1422
install:
1523
- composer install --no-progress --no-interaction --prefer-dist --no-suggest

composer.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@
1010
},
1111
"require-dev": {
1212
"phpunit/phpunit": "^5.0 | ^6.0",
13-
"zendframework/zend-mvc": "^2.0 | ^3.0"
13+
"zendframework/zend-mvc": "^2.0 | ^3.0",
14+
"zendframework/zend-view": "^2.0",
15+
"zendframework/zend-serializer": "^2.0",
16+
"zendframework/zend-log": "^2.0",
17+
"zendframework/zend-i18n": "^2.0",
18+
"zendframework/zend-console": "^2.0"
1419
},
1520
"authors": [
1621
{

tests/resources/application_config.php

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
<?php
22

3-
return [
4-
'modules' => [
5-
'Go\ZF2\GoAopModule',
3+
$modules = [
4+
'Go\ZF2\GoAopModule',
5+
];
66

7-
// Required to initialize application
8-
'Zend\Router',
9-
],
7+
if (class_exists('Zend\Router\Module')) {
8+
$modules[] = 'Zend\Router';
9+
}
1010

11+
return [
12+
'modules' => $modules,
1113
'module_listener_options' => [
1214
'module_paths' => [
1315
__DIR__ . '/../../vendor',

0 commit comments

Comments
 (0)