Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Updated Travis CI configuration to pass all builds (replace #173) #176

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 17 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
- COMPOSER_PROCESS_TIMEOUT=600
- COMPOSER_ARGS="--no-interaction"
- COVERAGE_DEPS="php-coveralls/php-coveralls"
- LEGACY_DEPS="phpunit/phpunit"
- LOWEST_REMOVE_DEV_DEPS="zendframework/zend-router"
- LATEST_DEPS="zendframework/zend-mvc-plugin-flashmessenger zendframework/zend-mvc-i18n zendframework/zend-mvc-console"

matrix:
Expand All @@ -22,6 +22,7 @@ matrix:
- php: 5.6
env:
- DEPS=locked
- LEGACY_DEPS="phpunit/phpunit"
- php: 5.6
env:
- DEPS=latest
Expand All @@ -31,8 +32,7 @@ matrix:
- php: 7
env:
- DEPS=locked
- CS_CHECK=true
- TEST_COVERAGE=true
- LEGACY_DEPS="phpunit/phpunit"
- php: 7
env:
- DEPS=latest
Expand All @@ -42,6 +42,8 @@ matrix:
- php: 7.1
env:
- DEPS=locked
- CS_CHECK=true
- TEST_COVERAGE=true
- php: 7.1
env:
- DEPS=latest
Expand All @@ -54,14 +56,24 @@ matrix:
- php: 7.2
env:
- DEPS=latest
- php: 7.3
env:
- DEPS=lowest
- php: 7.3
env:
- DEPS=locked
- php: 7.3
env:
- DEPS=latest

before_install:
- if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi

install:
- travis_retry composer install $COMPOSER_ARGS --ignore-platform-reqs
- if [[ $TRAVIS_PHP_VERSION =~ ^5.6 ]]; then travis_retry composer update $COMPOSER_ARGS --with-dependencies $LEGACY_DEPS ; fi
- if [[ $DEPS == 'latest' ]]; then travis_retry composer require --dev --no-update $COMPOSER_ARGS $LATEST_DEPS ; fi
- if [[ LEGACY_DEPS != '' ]]; then travis_retry composer update $COMPOSER_ARGS --with-dependencies $LEGACY_DEPS ; fi
- if [[ $DEPS == 'lowest' ]]; then travis_retry composer remove --dev $COMPOSER_ARGS $LOWEST_REMOVE_DEV_DEPS ; fi
- if [[ $DEPS != 'lowest' ]]; then travis_retry composer require --dev $COMPOSER_ARGS $LATEST_DEPS ; fi
- if [[ $DEPS == 'latest' ]]; then travis_retry composer update $COMPOSER_ARGS ; fi
- if [[ $DEPS == 'lowest' ]]; then travis_retry composer update --prefer-lowest --prefer-stable $COMPOSER_ARGS ; fi
- if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer require --dev $COMPOSER_ARGS $COVERAGE_DEPS ; fi
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"zendframework/zend-i18n": "^2.6",
"zendframework/zend-log": "^2.7",
"zendframework/zend-modulemanager": "^2.7.1",
"zendframework/zend-mvc": "^2.7 || ^3.0",
"zendframework/zend-mvc": "^2.7.14 || ^3.0",
"zendframework/zend-navigation": "^2.5",
"zendframework/zend-paginator": "^2.5",
"zendframework/zend-permissions-acl": "^2.6",
Expand Down
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions test/Helper/UrlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ protected function setUp()
? WildcardRoute::class
: NextGenWildcardRoute::class;

$routerClass = class_exists(Router::class)
$this->routerClass = class_exists(Router::class)
? Router::class
: NextGenRouter::class;

$router = new $routerClass();
$router = new $this->routerClass();
$router->addRoute('home', [
'type' => $this->literalRouteType,
'options' => [
Expand Down Expand Up @@ -243,15 +243,15 @@ public function testRemovesModuleRouteListenerParamsWhenReusingMatchedParameters

public function testAcceptsNextGenRouterToSetRouter()
{
$router = new NextGenRouter();
$router = new $this->routerClass();
$url = new UrlHelper();
$url->setRouter($router);
$this->assertAttributeSame($router, 'router', $url);
}

public function testAcceptsNextGenRouteMatche()
{
$routeMatch = new NextGenRouteMatch([]);
$routeMatch = new $this->routeMatchType([]);
$url = new UrlHelper();
$url->setRouteMatch($routeMatch);
$this->assertAttributeSame($routeMatch, 'routeMatch', $url);
Expand Down