summaryrefslogtreecommitdiffstats
path: root/Core
diff options
context:
space:
mode:
authorFabien Potencier <fabien.potencier@gmail.com>2015-03-30 17:55:07 +0200
committerFabien Potencier <fabien.potencier@gmail.com>2015-03-30 17:55:07 +0200
commitb071a103319fc4d8549e17e575c75b8b3417d8cd (patch)
tree3f901a8dc01d8a8af8c32b3dfdd622e6055c121f /Core
parent02b20eccaf64c7c3c138f89e91f0a83c90cebfa2 (diff)
parent06dbcd5a5464cccf4c748071f338f34130ecad06 (diff)
downloadsymfony-security-b071a103319fc4d8549e17e575c75b8b3417d8cd.zip
symfony-security-b071a103319fc4d8549e17e575c75b8b3417d8cd.tar.gz
symfony-security-b071a103319fc4d8549e17e575c75b8b3417d8cd.tar.bz2
Merge branch '2.6' into 2.7
* 2.6: [Validator] Add missing pt_BR translations Add parsing of hexadecimal strings for PHP 7 [Configuration] improve description for ignoreExtraKeys on ArrayNodeDefinition [Validator] Added missing Hungarian translation [Validator] Fixed grammar in Hungarian translation CS: Unary operators should be placed adjacent to their operands CS: Binary operators should be arounded by at least one space remove useless tests that fail in php 7 [Translator] fix test for php 7 compatibility Update phpdoc of ProcessBuilder#setPrefix() Conflicts: src/Symfony/Bridge/Propel1/Logger/PropelLogger.php src/Symfony/Component/Validator/Resources/translations/validators.hu.xlf
Diffstat (limited to 'Core')
-rw-r--r--Core/Authentication/Token/AbstractToken.php4
-rw-r--r--Core/Tests/Authentication/Token/RememberMeTokenTest.php17
-rw-r--r--Core/Tests/Util/SecureRandomTest.php2
3 files changed, 3 insertions, 20 deletions
diff --git a/Core/Authentication/Token/AbstractToken.php b/Core/Authentication/Token/AbstractToken.php
index c6bf09f..1d12ab0 100644
--- a/Core/Authentication/Token/AbstractToken.php
+++ b/Core/Authentication/Token/AbstractToken.php
@@ -231,7 +231,7 @@ abstract class AbstractToken implements TokenInterface
public function __toString()
{
$class = get_class($this);
- $class = substr($class, strrpos($class, '\\')+1);
+ $class = substr($class, strrpos($class, '\\') + 1);
$roles = array();
foreach ($this->roles as $role) {
@@ -248,7 +248,7 @@ abstract class AbstractToken implements TokenInterface
}
if ($this->user instanceof EquatableInterface) {
- return ! (bool) $this->user->isEqualTo($user);
+ return !(bool) $this->user->isEqualTo($user);
}
if ($this->user->getPassword() !== $user->getPassword()) {
diff --git a/Core/Tests/Authentication/Token/RememberMeTokenTest.php b/Core/Tests/Authentication/Token/RememberMeTokenTest.php
index 691f54c..7449204 100644
--- a/Core/Tests/Authentication/Token/RememberMeTokenTest.php
+++ b/Core/Tests/Authentication/Token/RememberMeTokenTest.php
@@ -52,23 +52,6 @@ class RememberMeTokenTest extends \PHPUnit_Framework_TestCase
);
}
- /**
- * @expectedException \PHPUnit_Framework_Error
- * @dataProvider getUserArguments
- */
- public function testConstructorUserCannotBeNull($user)
- {
- new RememberMeToken($user, 'foo', 'foo');
- }
-
- public function getUserArguments()
- {
- return array(
- array(null),
- array('foo'),
- );
- }
-
protected function getUser($roles = array('ROLE_FOO'))
{
$user = $this->getMock('Symfony\Component\Security\Core\User\UserInterface');
diff --git a/Core/Tests/Util/SecureRandomTest.php b/Core/Tests/Util/SecureRandomTest.php
index 590efd3..5dfe1c8 100644
--- a/Core/Tests/Util/SecureRandomTest.php
+++ b/Core/Tests/Util/SecureRandomTest.php
@@ -49,7 +49,7 @@ class SecureRandomTest extends \PHPUnit_Framework_TestCase
$f += $c[$i] * $c[$i];
}
- $Y = 16/5000 * $f - 5000;
+ $Y = 16 / 5000 * $f - 5000;
$this->assertTrue($Y > 1.03 && $Y < 57.4, 'Poker test failed, Y = '.$Y);
}