summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'Tests')
-rw-r--r--Tests/Acl/Dbal/AclProviderBenchmarkTest.php8
-rw-r--r--Tests/Core/Util/SecureRandomTest.php8
-rw-r--r--Tests/Http/Firewall/ExceptionListenerTest.php6
3 files changed, 11 insertions, 11 deletions
diff --git a/Tests/Acl/Dbal/AclProviderBenchmarkTest.php b/Tests/Acl/Dbal/AclProviderBenchmarkTest.php
index c25a697..1a46d27 100644
--- a/Tests/Acl/Dbal/AclProviderBenchmarkTest.php
+++ b/Tests/Acl/Dbal/AclProviderBenchmarkTest.php
@@ -122,7 +122,7 @@ class AclProviderBenchmarkTest extends \PHPUnit_Framework_TestCase
if ($id === 1000 || ($id < 1500 && rand(0, 1))) {
$this->insertClassStmt->execute(array($id, $this->getRandomString(rand(20, 100), 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\\_')));
- $id += 1;
+ ++$id;
return $id-1;
} else {
@@ -148,7 +148,7 @@ class AclProviderBenchmarkTest extends \PHPUnit_Framework_TestCase
}
$this->generateAces($classId, $id);
- $id += 1;
+ ++$id;
return $id-1;
}
@@ -163,7 +163,7 @@ class AclProviderBenchmarkTest extends \PHPUnit_Framework_TestCase
$this->getRandomString(rand(5, 30)),
rand(0, 1),
));
- $id += 1;
+ ++$id;
return $id-1;
} else {
@@ -215,7 +215,7 @@ class AclProviderBenchmarkTest extends \PHPUnit_Framework_TestCase
rand(0, 1),
));
- $id += 1;
+ ++$id;
}
}
diff --git a/Tests/Core/Util/SecureRandomTest.php b/Tests/Core/Util/SecureRandomTest.php
index bd9fec5..a8cc660 100644
--- a/Tests/Core/Util/SecureRandomTest.php
+++ b/Tests/Core/Util/SecureRandomTest.php
@@ -41,7 +41,7 @@ class SecureRandomTest extends \PHPUnit_Framework_TestCase
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]] += 1;
+ ++$c[8 * $b[$k - 3] + 4 * $b[$k - 2] + 2 * $b[$k - 1] + $b[$k]];
}
$f = 0;
@@ -73,14 +73,14 @@ class SecureRandomTest extends \PHPUnit_Framework_TestCase
$run = 6;
}
- $runs[$run] += 1;
+ ++$runs[$run];
};
$currentRun = 0;
$lastBit = null;
for ($i = 0; $i < 20000; $i++) {
if ($lastBit === $b[$i]) {
- $currentRun += 1;
+ ++$currentRun;
} else {
if ($currentRun > 0) {
$addRun($currentRun);
@@ -115,7 +115,7 @@ class SecureRandomTest extends \PHPUnit_Framework_TestCase
$lastBit = null;
for ($i = 0; $i < 20000; $i++) {
if ($lastBit === $b[$i]) {
- $currentRun += 1;
+ ++$currentRun;
} else {
if ($currentRun > $longestRun) {
$longestRun = $currentRun;
diff --git a/Tests/Http/Firewall/ExceptionListenerTest.php b/Tests/Http/Firewall/ExceptionListenerTest.php
index b1c7622..12f18a6 100644
--- a/Tests/Http/Firewall/ExceptionListenerTest.php
+++ b/Tests/Http/Firewall/ExceptionListenerTest.php
@@ -177,9 +177,9 @@ class ExceptionListenerTest extends \PHPUnit_Framework_TestCase
private function createExceptionListener(SecurityContextInterface $context = null, AuthenticationTrustResolverInterface $trustResolver = null, HttpUtils $httpUtils = null, AuthenticationEntryPointInterface $authenticationEntryPoint = null, $errorPage = null, AccessDeniedHandlerInterface $accessDeniedHandler = null)
{
return new ExceptionListener(
- $context ? $context : $this->getMock('Symfony\Component\Security\Core\SecurityContextInterface'),
- $trustResolver ? $trustResolver : $this->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolverInterface'),
- $httpUtils ? $httpUtils : $this->getMock('Symfony\Component\Security\Http\HttpUtils'),
+ $context ?: $this->getMock('Symfony\Component\Security\Core\SecurityContextInterface'),
+ $trustResolver ?: $this->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolverInterface'),
+ $httpUtils ?: $this->getMock('Symfony\Component\Security\Http\HttpUtils'),
'key',
$authenticationEntryPoint,
$errorPage,