summaryrefslogtreecommitdiffstats
path: root/Core
diff options
context:
space:
mode:
authorFabien Potencier <fabien.potencier@gmail.com>2014-02-11 14:52:09 +0100
committerFabien Potencier <fabien.potencier@gmail.com>2014-02-11 14:52:09 +0100
commitae020b9dc10e6438dc4033103c16bae7d46a4dd6 (patch)
tree9c97b190916296a384c99d47ff167771702640b7 /Core
parentd8edd9cf953bc18a76312aae4c10ff1f5d4783f9 (diff)
parentfc8250e983069954aa8b74703664cf5dc988d863 (diff)
downloadsymfony-security-ae020b9dc10e6438dc4033103c16bae7d46a4dd6.zip
symfony-security-ae020b9dc10e6438dc4033103c16bae7d46a4dd6.tar.gz
symfony-security-ae020b9dc10e6438dc4033103c16bae7d46a4dd6.tar.bz2
Merge branch '2.3' into 2.4v2.4.2
* 2.3: fixed various inconsistencies reduced recursion when building DumperPrefixCollection renamed variables - making next change more readable removing dead code. [DomCrawler] Fixed filterXPath() chaining [DomCrawler] Fixed incorrect handling of image inputs Conflicts: src/Symfony/Component/DomCrawler/Crawler.php src/Symfony/Component/EventDispatcher/Tests/EventDispatcherTest.php src/Symfony/Component/Form/Extension/DependencyInjection/DependencyInjectionExtension.php src/Symfony/Component/Serializer/Tests/Normalizer/CustomNormalizerTest.php src/Symfony/Component/Templating/Tests/Loader/CacheLoaderTest.php src/Symfony/Component/Templating/Tests/Loader/LoaderTest.php
Diffstat (limited to 'Core')
-rw-r--r--Core/Tests/Authentication/Provider/DaoAuthenticationProviderTest.php18
-rw-r--r--Core/Tests/Authentication/Provider/PreAuthenticatedAuthenticationProviderTest.php6
-rw-r--r--Core/Tests/Util/SecureRandomTest.php4
3 files changed, 14 insertions, 14 deletions
diff --git a/Core/Tests/Authentication/Provider/DaoAuthenticationProviderTest.php b/Core/Tests/Authentication/Provider/DaoAuthenticationProviderTest.php
index ed4fe10..3e285d7 100644
--- a/Core/Tests/Authentication/Provider/DaoAuthenticationProviderTest.php
+++ b/Core/Tests/Authentication/Provider/DaoAuthenticationProviderTest.php
@@ -115,7 +115,7 @@ class DaoAuthenticationProviderTest extends \PHPUnit_Framework_TestCase
->method('isPasswordValid')
;
- $provider = $this->getProvider(false, false, $encoder);
+ $provider = $this->getProvider(null, null, $encoder);
$method = new \ReflectionMethod($provider, 'checkAuthentication');
$method->setAccessible(true);
@@ -142,7 +142,7 @@ class DaoAuthenticationProviderTest extends \PHPUnit_Framework_TestCase
->will($this->returnValue(true))
;
- $provider = $this->getProvider(false, false, $encoder);
+ $provider = $this->getProvider(null, null, $encoder);
$method = new \ReflectionMethod($provider, 'checkAuthentication');
$method->setAccessible(true);
@@ -171,7 +171,7 @@ class DaoAuthenticationProviderTest extends \PHPUnit_Framework_TestCase
->will($this->returnValue(false))
;
- $provider = $this->getProvider(false, false, $encoder);
+ $provider = $this->getProvider(null, null, $encoder);
$method = new \ReflectionMethod($provider, 'checkAuthentication');
$method->setAccessible(true);
@@ -206,7 +206,7 @@ class DaoAuthenticationProviderTest extends \PHPUnit_Framework_TestCase
->will($this->returnValue('newFoo'))
;
- $provider = $this->getProvider(false, false, null);
+ $provider = $this->getProvider();
$reflection = new \ReflectionMethod($provider, 'checkAuthentication');
$reflection->setAccessible(true);
$reflection->invoke($provider, $dbUser, $token);
@@ -231,7 +231,7 @@ class DaoAuthenticationProviderTest extends \PHPUnit_Framework_TestCase
->will($this->returnValue('foo'))
;
- $provider = $this->getProvider(false, false, null);
+ $provider = $this->getProvider();
$reflection = new \ReflectionMethod($provider, 'checkAuthentication');
$reflection->setAccessible(true);
$reflection->invoke($provider, $dbUser, $token);
@@ -245,7 +245,7 @@ class DaoAuthenticationProviderTest extends \PHPUnit_Framework_TestCase
->will($this->returnValue(true))
;
- $provider = $this->getProvider(false, false, $encoder);
+ $provider = $this->getProvider(null, null, $encoder);
$method = new \ReflectionMethod($provider, 'checkAuthentication');
$method->setAccessible(true);
@@ -270,17 +270,17 @@ class DaoAuthenticationProviderTest extends \PHPUnit_Framework_TestCase
return $mock;
}
- protected function getProvider($user = false, $userChecker = false, $passwordEncoder = null)
+ protected function getProvider($user = null, $userChecker = null, $passwordEncoder = null)
{
$userProvider = $this->getMock('Symfony\\Component\\Security\\Core\\User\\UserProviderInterface');
- if (false !== $user) {
+ if (null !== $user) {
$userProvider->expects($this->once())
->method('loadUserByUsername')
->will($this->returnValue($user))
;
}
- if (false === $userChecker) {
+ if (null === $userChecker) {
$userChecker = $this->getMock('Symfony\\Component\\Security\\Core\\User\\UserCheckerInterface');
}
diff --git a/Core/Tests/Authentication/Provider/PreAuthenticatedAuthenticationProviderTest.php b/Core/Tests/Authentication/Provider/PreAuthenticatedAuthenticationProviderTest.php
index 522edb4..4a8bf6c 100644
--- a/Core/Tests/Authentication/Provider/PreAuthenticatedAuthenticationProviderTest.php
+++ b/Core/Tests/Authentication/Provider/PreAuthenticatedAuthenticationProviderTest.php
@@ -114,17 +114,17 @@ class PreAuthenticatedAuthenticationProviderTest extends \PHPUnit_Framework_Test
return $token;
}
- protected function getProvider($user = false, $userChecker = false)
+ protected function getProvider($user = null, $userChecker = null)
{
$userProvider = $this->getMock('Symfony\Component\Security\Core\User\UserProviderInterface');
- if (false !== $user) {
+ if (null !== $user) {
$userProvider->expects($this->once())
->method('loadUserByUsername')
->will($this->returnValue($user))
;
}
- if (false === $userChecker) {
+ if (null === $userChecker) {
$userChecker = $this->getMock('Symfony\Component\Security\Core\User\UserCheckerInterface');
}
diff --git a/Core/Tests/Util/SecureRandomTest.php b/Core/Tests/Util/SecureRandomTest.php
index 4cfdb2c..e3fde69 100644
--- a/Core/Tests/Util/SecureRandomTest.php
+++ b/Core/Tests/Util/SecureRandomTest.php
@@ -111,8 +111,8 @@ class SecureRandomTest extends \PHPUnit_Framework_TestCase
{
$b = $this->getBitSequence($secureRandom, 20000);
- $longestRun = 0;
- $currentRun = $lastBit = null;
+ $longestRun = $currentRun = 0;
+ $lastBit = null;
for ($i = 0; $i < 20000; $i++) {
if ($lastBit === $b[$i]) {
$currentRun += 1;