Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d800c75

Browse files
committed
Merge pull request suncat2000#81 from xabbuh/patch-1
improve the Travis CI configuration
2 parents 15f6719 + c380e4e commit d800c75

3 files changed

Lines changed: 25 additions & 10 deletions

File tree

.travis.yml

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,32 @@
1+
sudo: false
2+
13
language:
24
- php
35

6+
cache:
7+
directories:
8+
- $HOME/.composer/cache/files
9+
410
php:
511
- 5.3
612
- 5.4
713
- 5.5
14+
- 7.0
15+
- hhvm
816

9-
env:
10-
- SYMFONY_VERSION=2.1.*
11-
- SYMFONY_VERSION=2.2.*
12-
- SYMFONY_VERSION=2.3.*
13-
- SYMFONY_VERSION=2.4.*
17+
matrix:
18+
include:
19+
- php: 5.6
20+
env: SYMFONY_VERSION=2.3.*
21+
- php: 5.6
22+
env: SYMFONY_VERSION=2.7.*
23+
- php: 5.6
24+
env: COVERAGE=yes
1425

1526
before_script:
16-
- composer require symfony/framework-bundle:${SYMFONY_VERSION}
17-
- composer update --dev
27+
- if [ "$SYMFONY_VERSION" != "" ]; then composer require --no-update symfony/framework-bundle:${SYMFONY_VERSION}; fi
28+
- composer install
29+
- if [ "$COVERAGE" != "yes" -a "$TRAVIS_PHP_VERSION" != "hhvm" ]; then phpenv config-rm xdebug.ini; fi
1830

1931
script:
20-
- phpunit --coverage-text
32+
- if [ "$COVERAGE" = "yes" ]; then ./vendor/bin/phpunit --coverage-text; else ./vendor/bin/phpunit; fi

Tests/EventListener/RequestListenerTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,10 @@ public function setUp()
6464

6565
$this->mobileDetector = $this->getMockBuilder('SunCat\MobileDetectBundle\DeviceDetector\MobileDetector')->disableOriginalConstructor()->getMock();
6666
$this->deviceView = $this->getMockBuilder('SunCat\MobileDetectBundle\Helper\DeviceView')->disableOriginalConstructor()->getMock();
67-
$this->router = $this->getMockBuilder('Symfony\Bundle\FrameworkBundle\Routing\Router')->disableOriginalConstructor()->getMock();
67+
$this->router = $this->getMockBuilder('Symfony\Bundle\FrameworkBundle\Routing\Router')
68+
->disableOriginalConstructor()
69+
->setMethods(array('getRouteCollection'))
70+
->getMock();
6871

6972
$this->request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->getMock();
7073
$this->request->expects($this->any())->method('getScheme')->will($this->returnValue('http'));

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"mobiledetect/mobiledetectlib": "~2.8"
1919
},
2020
"require-dev": {
21-
"phpunit/phpunit": "~4.1"
21+
"phpunit/phpunit": "~4.1|~5.0"
2222
},
2323
"autoload": {
2424
"psr-0": {

0 commit comments

Comments
 (0)