Skip to content

Commit 4ccfe49

Browse files
Merge branch '2.3' into 2.7
* 2.3: [travis] session.gc_probability=0 to fix transient tests on hhvm Conflicts: .travis.yml src/Symfony/Component/HttpKernel/Tests/Fragment/FragmentHandlerTest.php
2 parents e53b3b3 + 38a92c8 commit 4ccfe49

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

.travis.yml

+8-6
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,17 @@ env:
3232

3333
before_install:
3434
- if [[ "$deps" = "no" ]] && [[ "$TRAVIS_PHP_VERSION" =~ 5.[45] ]] && [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then export deps=skip; fi;
35+
- if [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then INI_FILE=~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; else INI_FILE=/etc/hhvm/php.ini; fi;
36+
- echo "memory_limit = -1" >> $INI_FILE
37+
- echo "session.gc_probability = 0" >> $INI_FILE
3538
- if [ "$deps" != "skip" ]; then composer self-update; fi;
36-
- if [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then echo "memory_limit = -1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi;
3739
- if [[ "$TRAVIS_PHP_VERSION" = 5.* ]]; then phpenv config-rm xdebug.ini; fi;
38-
- if [[ "$TRAVIS_PHP_VERSION" = 5.* ]]; then echo "extension = mongo.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi;
39-
- if [[ "$TRAVIS_PHP_VERSION" = 5.* ]]; then echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi;
40-
- if [[ "$TRAVIS_PHP_VERSION" = 5.* ]]; then (echo yes | pecl install -f apcu-4.0.7 && echo "apc.enable_cli = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini) || echo "Let's continue without apcu extension"; fi;
40+
- if [[ "$TRAVIS_PHP_VERSION" = 5.* ]]; then echo "extension = mongo.so" >> $INI_FILE; fi;
41+
- if [[ "$TRAVIS_PHP_VERSION" = 5.* ]]; then echo "extension = memcache.so" >> $INI_FILE; fi;
42+
- if [[ "$TRAVIS_PHP_VERSION" = 5.* ]]; then (echo yes | pecl install -f apcu-4.0.7 && echo "apc.enable_cli = 1" >> $INI_FILE) || echo "Let's continue without apcu extension"; fi;
4143
- if [[ "$TRAVIS_PHP_VERSION" = 5.* ]]; then pecl install -f memcached-2.1.0 || echo "Let's continue without memcached extension"; fi;
42-
- if [[ "$TRAVIS_PHP_VERSION" = 5.* ]] && [ "$deps" = "no" ]; then (cd src/Symfony/Component/Debug/Resources/ext && phpize && ./configure && make && echo "extension = $(pwd)/modules/symfony_debug.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini); fi;
43-
- if [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then php -i; fi;
44+
- if [[ "$TRAVIS_PHP_VERSION" = 5.* ]] && [ "$deps" = "no" ]; then (cd src/Symfony/Component/Debug/Resources/ext && phpize && ./configure && make && echo "extension = $(pwd)/modules/symfony_debug.so" >> $INI_FILE); fi;
45+
- if [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then php -i; else hhvm --php -r 'print_r($_SERVER);print_r(ini_get_all());'; fi;
4446
- if [ "$deps" != "skip" ]; then ./phpunit install; fi;
4547
- export PHPUNIT="$(readlink -f ./phpunit)"
4648

src/Symfony/Component/HttpKernel/Tests/Fragment/FragmentHandlerTest.php

+4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Symfony\Component\HttpKernel\Fragment\FragmentHandler;
1515
use Symfony\Component\HttpFoundation\Request;
1616
use Symfony\Component\HttpFoundation\Response;
17+
use Symfony\Bridge\PhpUnit\ClockMock;
1718

1819
/**
1920
* @group time-sensitive
@@ -24,6 +25,9 @@ class FragmentHandlerTest extends \PHPUnit_Framework_TestCase
2425

2526
protected function setUp()
2627
{
28+
if (class_exists('Symfony\Bridge\PhpUnit\ClockMock')) {
29+
ClockMock::register('Symfony\Component\HttpFoundation\Request');
30+
}
2731
$this->requestStack = $this->getMockBuilder('Symfony\\Component\\HttpFoundation\\RequestStack')
2832
->disableOriginalConstructor()
2933
->getMock()

0 commit comments

Comments
 (0)