diff options
author | Fabien Potencier <fabien.potencier@gmail.com> | 2015-05-15 15:32:45 +0200 |
---|---|---|
committer | Fabien Potencier <fabien.potencier@gmail.com> | 2015-05-15 15:32:45 +0200 |
commit | f81b1cd7a05c28ce191bc5d4295bbea7367368d4 (patch) | |
tree | 162878fcf036372b2b7afeccc92b689c3c292cdd /Core/Tests | |
parent | db95dbe483b2f8ce7bae38ea37ae1f42fe141a6c (diff) | |
parent | c29b2f6d4618d6366d6e5fb3770169c7e1773bf3 (diff) | |
download | symfony-security-f81b1cd7a05c28ce191bc5d4295bbea7367368d4.zip symfony-security-f81b1cd7a05c28ce191bc5d4295bbea7367368d4.tar.gz symfony-security-f81b1cd7a05c28ce191bc5d4295bbea7367368d4.tar.bz2 |
Merge branch '2.3' into 2.6
* 2.3:
Fix tests in HHVM
CS: Pre incrementation/decrementation should be used if possible
Conflicts:
src/Symfony/Bundle/TwigBundle/Command/LintCommand.php
src/Symfony/Component/Console/Helper/TableHelper.php
src/Symfony/Component/EventDispatcher/Tests/EventDispatcherTest.php
src/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php
src/Symfony/Component/HttpKernel/HttpCache/EsiResponseCacheStrategy.php
src/Symfony/Component/Security/Acl/Dbal/AclProvider.php
src/Symfony/Component/Security/Http/RememberMe/TokenBasedRememberMeServices.php
Diffstat (limited to 'Core/Tests')
-rw-r--r-- | Core/Tests/Authorization/AccessDecisionManagerTest.php | 6 | ||||
-rw-r--r-- | Core/Tests/Encoder/BCryptPasswordEncoderTest.php | 2 | ||||
-rw-r--r-- | Core/Tests/Util/SecureRandomTest.php | 14 |
3 files changed, 11 insertions, 11 deletions
diff --git a/Core/Tests/Authorization/AccessDecisionManagerTest.php b/Core/Tests/Authorization/AccessDecisionManagerTest.php index 126bfe8..3c970d1 100644 --- a/Core/Tests/Authorization/AccessDecisionManagerTest.php +++ b/Core/Tests/Authorization/AccessDecisionManagerTest.php @@ -153,13 +153,13 @@ class AccessDecisionManagerTest extends \PHPUnit_Framework_TestCase protected function getVoters($grants, $denies, $abstains) { $voters = array(); - for ($i = 0; $i < $grants; $i++) { + for ($i = 0; $i < $grants; ++$i) { $voters[] = $this->getVoter(VoterInterface::ACCESS_GRANTED); } - for ($i = 0; $i < $denies; $i++) { + for ($i = 0; $i < $denies; ++$i) { $voters[] = $this->getVoter(VoterInterface::ACCESS_DENIED); } - for ($i = 0; $i < $abstains; $i++) { + for ($i = 0; $i < $abstains; ++$i) { $voters[] = $this->getVoter(VoterInterface::ACCESS_ABSTAIN); } diff --git a/Core/Tests/Encoder/BCryptPasswordEncoderTest.php b/Core/Tests/Encoder/BCryptPasswordEncoderTest.php index 2f7b845..ecad3e5 100644 --- a/Core/Tests/Encoder/BCryptPasswordEncoderTest.php +++ b/Core/Tests/Encoder/BCryptPasswordEncoderTest.php @@ -40,7 +40,7 @@ class BCryptPasswordEncoderTest extends \PHPUnit_Framework_TestCase public function testCostInRange() { - for ($cost = 4; $cost <= 31; $cost++) { + for ($cost = 4; $cost <= 31; ++$cost) { new BCryptPasswordEncoder($cost); } } diff --git a/Core/Tests/Util/SecureRandomTest.php b/Core/Tests/Util/SecureRandomTest.php index 5dfe1c8..666af30 100644 --- a/Core/Tests/Util/SecureRandomTest.php +++ b/Core/Tests/Util/SecureRandomTest.php @@ -35,17 +35,17 @@ class SecureRandomTest extends \PHPUnit_Framework_TestCase { $b = $this->getBitSequence($secureRandom, 20000); $c = array(); - for ($i = 0; $i <= 15; $i++) { + for ($i = 0; $i <= 15; ++$i) { $c[$i] = 0; } - for ($j = 1; $j <= 5000; $j++) { + for ($j = 1; $j <= 5000; ++$j) { $k = 4 * $j - 1; ++$c[8 * $b[$k - 3] + 4 * $b[$k - 2] + 2 * $b[$k - 1] + $b[$k]]; } $f = 0; - for ($i = 0; $i <= 15; $i++) { + for ($i = 0; $i <= 15; ++$i) { $f += $c[$i] * $c[$i]; } @@ -64,7 +64,7 @@ class SecureRandomTest extends \PHPUnit_Framework_TestCase $b = $this->getBitSequence($secureRandom, 20000); $runs = array(); - for ($i = 1; $i <= 6; $i++) { + for ($i = 1; $i <= 6; ++$i) { $runs[$i] = 0; } @@ -78,7 +78,7 @@ class SecureRandomTest extends \PHPUnit_Framework_TestCase $currentRun = 0; $lastBit = null; - for ($i = 0; $i < 20000; $i++) { + for ($i = 0; $i < 20000; ++$i) { if ($lastBit === $b[$i]) { ++$currentRun; } else { @@ -113,7 +113,7 @@ class SecureRandomTest extends \PHPUnit_Framework_TestCase $longestRun = $currentRun = 0; $lastBit = null; - for ($i = 0; $i < 20000; $i++) { + for ($i = 0; $i < 20000; ++$i) { if ($lastBit === $b[$i]) { ++$currentRun; } else { @@ -142,7 +142,7 @@ class SecureRandomTest extends \PHPUnit_Framework_TestCase $b = $this->getBitSequence($secureRandom, 20000); $Z = 0; - for ($i = 0; $i < 5000; $i++) { + for ($i = 0; $i < 5000; ++$i) { $Z += $b[$i] === $b[$i + $shift] ? 1 : 0; } |