mirror of
https://github.com/wallabag/wallabag.git
synced 2025-01-11 01:15:26 +00:00
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
This commit is contained in:
parent
b10a422e1f
commit
db4d63fc1a
3 changed files with 7 additions and 2 deletions
|
@ -55,6 +55,7 @@ branches:
|
||||||
before_script:
|
before_script:
|
||||||
- if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi;
|
- if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi;
|
||||||
- if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then phpenv config-rm xdebug.ini; fi;
|
- if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then phpenv config-rm xdebug.ini; fi;
|
||||||
|
- if [ "$TRAVIS_PHP_VERSION" = "5.5" ]; then composer require "phpunit/phpunit:4.*" --no-update; fi;
|
||||||
- composer self-update --no-progress
|
- composer self-update --no-progress
|
||||||
- if [[ "$DB" = "pgsql" ]]; then psql -c 'create database wallabag_test;' -U postgres; fi;
|
- if [[ "$DB" = "pgsql" ]]; then psql -c 'create database wallabag_test;' -U postgres; fi;
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,7 @@
|
||||||
"doctrine/doctrine-fixtures-bundle": "~2.2",
|
"doctrine/doctrine-fixtures-bundle": "~2.2",
|
||||||
"doctrine/data-fixtures": "~1.1.1",
|
"doctrine/data-fixtures": "~1.1.1",
|
||||||
"sensio/generator-bundle": "^3.0",
|
"sensio/generator-bundle": "^3.0",
|
||||||
"phpunit/phpunit": "~4.4",
|
"phpunit/phpunit": "~5.0",
|
||||||
"symfony/phpunit-bridge": "^3.0",
|
"symfony/phpunit-bridge": "^3.0",
|
||||||
"friendsofphp/php-cs-fixer": "~1.9"
|
"friendsofphp/php-cs-fixer": "~1.9"
|
||||||
},
|
},
|
||||||
|
|
|
@ -15,7 +15,11 @@ class LocaleListenerTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
private function getEvent(Request $request)
|
private function getEvent(Request $request)
|
||||||
{
|
{
|
||||||
return new GetResponseEvent($this->getMock('Symfony\Component\HttpKernel\HttpKernelInterface'), $request, HttpKernelInterface::MASTER_REQUEST);
|
$kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')
|
||||||
|
->disableOriginalConstructor()
|
||||||
|
->getMock();
|
||||||
|
|
||||||
|
return new GetResponseEvent($kernel, $request, HttpKernelInterface::MASTER_REQUEST);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testWithoutSession()
|
public function testWithoutSession()
|
||||||
|
|
Loading…
Reference in a new issue