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

Skip to content

Commit 352049c

Browse files
Merge branch '2.7' into 2.8
* 2.7: Clean EOL whitespace [travis] Fix [Routing] Reduce memory usage of a high consuming test case use requires annotation skip bcrypt tests on incompatible platforms
2 parents 6fa4d5b + 68b3d2d commit 352049c

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ before_install:
5050
install:
5151
- if [[ $deps != skip ]]; then COMPONENTS=$(find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist -printf '%h\n'); fi;
5252
- if [[ $deps != skip && $deps ]]; then php .travis.php $TRAVIS_COMMIT_RANGE $TRAVIS_BRANCH $COMPONENTS; fi;
53-
- if [[ $deps = high && $TRAVIS_BRANCH = master ]]; then SYMFONY_VERSION=$(git branch -r | grep -o '/[1-9].*' | tail -n 1 | sed s/.//); else SYMFONY_VERSION=$(cat composer.json | grep '^ *"dev-master". *"[1-9]' | grep -o '[0-9.]*'); fi;
53+
- if [[ $deps = high && $TRAVIS_BRANCH = master ]]; then SYMFONY_VERSION=$(git ls-remote --heads | grep -o '/[1-9].*' | tail -n 1 | sed s/.//); else SYMFONY_VERSION=$(cat composer.json | grep '^ *"dev-master". *"[1-9]' | grep -o '[0-9.]*'); fi;
5454
- if [[ $deps = high && $TRAVIS_BRANCH = master ]]; then git fetch origin $SYMFONY_VERSION; git checkout -m FETCH_HEAD; fi;
55-
- if [[ $deps = high && ${SYMFONY_VERSION%.*} != $(git show $(git branch -r | grep -FA1 /$SYMFONY_VERSION | tail -n 1):composer.json | grep '^ *"dev-master". *"[1-9]' | grep -o '[0-9]*' | head -n 1) ]]; then LEGACY=,legacy; fi;
55+
- if [[ $deps = high && ${SYMFONY_VERSION%.*} != $(git show $(git ls-remote --heads | grep -FA1 /$SYMFONY_VERSION | tail -n 1):composer.json | grep '^ *"dev-master". *"[1-9]' | grep -o '[0-9]*' | head -n 1) ]]; then LEGACY=,legacy; fi;
5656
- export COMPOSER_ROOT_VERSION=$SYMFONY_VERSION.x-dev;
5757
- if [[ ! $deps ]]; then composer --prefer-source install; else export SYMFONY_DEPRECATIONS_HELPER=weak; fi;
5858
- if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then php -i; else hhvm --php -r 'print_r($_SERVER);print_r(ini_get_all());'; fi;

src/Symfony/Component/Routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,10 @@ public function testDumpWithTooManyRoutes()
9191
}
9292
$this->routeCollection->add('Test2', new Route('/testing2'));
9393

94-
$data = $this->generatorDumper->dump(array(
94+
file_put_contents($this->largeTestTmpFilepath, $this->generatorDumper->dump(array(
9595
'class' => 'ProjectLargeUrlGenerator',
96-
));
97-
file_put_contents($this->largeTestTmpFilepath, $data);
96+
)));
97+
$this->routeCollection = $this->generatorDumper = null;
9898
include $this->largeTestTmpFilepath;
9999

100100
$projectUrlGenerator = new \ProjectLargeUrlGenerator(new RequestContext('/app.php'));

src/Symfony/Component/Security/Core/Tests/Encoder/BCryptPasswordEncoderTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,19 @@ public function testCostInRange()
4545
}
4646
}
4747

48+
/**
49+
* @requires PHP 5.3.7
50+
*/
4851
public function testResultLength()
4952
{
5053
$encoder = new BCryptPasswordEncoder(self::VALID_COST);
5154
$result = $encoder->encodePassword(self::PASSWORD, null);
5255
$this->assertEquals(60, strlen($result));
5356
}
5457

58+
/**
59+
* @requires PHP 5.3.7
60+
*/
5561
public function testValidation()
5662
{
5763
$encoder = new BCryptPasswordEncoder(self::VALID_COST);
@@ -70,6 +76,9 @@ public function testEncodePasswordLength()
7076
$encoder->encodePassword(str_repeat('a', 73), 'salt');
7177
}
7278

79+
/**
80+
* @requires PHP 5.3.7
81+
*/
7382
public function testCheckPasswordLength()
7483
{
7584
$encoder = new BCryptPasswordEncoder(self::VALID_COST);

0 commit comments

Comments
 (0)