aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2016-07-24 11:15:51 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-08-22 20:16:50 +0200
commitdb4d63fc1ae513335b751beb8f89e1eed61871c2 (patch)
treec1406cef26fa9d8e0498f889588f17d403a5ba91
parentb10a422e1f24d57c0cc616f5f06f35676335187e (diff)
downloadwallabag-db4d63fc1ae513335b751beb8f89e1eed61871c2.tar.gz
wallabag-db4d63fc1ae513335b751beb8f89e1eed61871c2.tar.zst
wallabag-db4d63fc1ae513335b751beb8f89e1eed61871c2.zip
Upgrade PHPUnit to version 5
- Fix deprecated getMock - Use PHPUnit 4 for PHP 5.5 build Manually cherry-picked from PR https://github.com/wallabag/wallabag/pull/2201
-rw-r--r--.travis.yml1
-rw-r--r--composer.json2
-rw-r--r--tests/Wallabag/CoreBundle/EventListener/LocaleListenerTest.php6
3 files changed, 7 insertions, 2 deletions
diff --git a/.travis.yml b/.travis.yml
index dd8815c1..69b4f919 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -55,6 +55,7 @@ branches:
55before_script: 55before_script:
56 - if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi; 56 - if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi;
57 - if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then phpenv config-rm xdebug.ini; fi; 57 - if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then phpenv config-rm xdebug.ini; fi;
58 - if [ "$TRAVIS_PHP_VERSION" = "5.5" ]; then composer require "phpunit/phpunit:4.*" --no-update; fi;
58 - composer self-update --no-progress 59 - composer self-update --no-progress
59 - if [[ "$DB" = "pgsql" ]]; then psql -c 'create database wallabag_test;' -U postgres; fi; 60 - if [[ "$DB" = "pgsql" ]]; then psql -c 'create database wallabag_test;' -U postgres; fi;
60 61
diff --git a/composer.json b/composer.json
index 38ccec81..bdaad601 100644
--- a/composer.json
+++ b/composer.json
@@ -87,7 +87,7 @@
87 "doctrine/doctrine-fixtures-bundle": "~2.2", 87 "doctrine/doctrine-fixtures-bundle": "~2.2",
88 "doctrine/data-fixtures": "~1.1.1", 88 "doctrine/data-fixtures": "~1.1.1",
89 "sensio/generator-bundle": "^3.0", 89 "sensio/generator-bundle": "^3.0",
90 "phpunit/phpunit": "~4.4", 90 "phpunit/phpunit": "~5.0",
91 "symfony/phpunit-bridge": "^3.0", 91 "symfony/phpunit-bridge": "^3.0",
92 "friendsofphp/php-cs-fixer": "~1.9" 92 "friendsofphp/php-cs-fixer": "~1.9"
93 }, 93 },
diff --git a/tests/Wallabag/CoreBundle/EventListener/LocaleListenerTest.php b/tests/Wallabag/CoreBundle/EventListener/LocaleListenerTest.php
index 2a7f9390..078bb69a 100644
--- a/tests/Wallabag/CoreBundle/EventListener/LocaleListenerTest.php
+++ b/tests/Wallabag/CoreBundle/EventListener/LocaleListenerTest.php
@@ -15,7 +15,11 @@ class LocaleListenerTest extends \PHPUnit_Framework_TestCase
15{ 15{
16 private function getEvent(Request $request) 16 private function getEvent(Request $request)
17 { 17 {
18 return new GetResponseEvent($this->getMock('Symfony\Component\HttpKernel\HttpKernelInterface'), $request, HttpKernelInterface::MASTER_REQUEST); 18 $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')
19 ->disableOriginalConstructor()
20 ->getMock();
21
22 return new GetResponseEvent($kernel, $request, HttpKernelInterface::MASTER_REQUEST);
19 } 23 }
20 24
21 public function testWithoutSession() 25 public function testWithoutSession()