rename String to StringUtils
This commit is contained in:
parent
5849855eb9
commit
234f7255bb
@ -11,7 +11,7 @@
|
||||
|
||||
namespace Symfony\Component\Security\Core\Encoder;
|
||||
|
||||
use Symfony\Component\Security\Core\Util\String;
|
||||
use Symfony\Component\Security\Core\Util\StringUtils;
|
||||
|
||||
/**
|
||||
* BasePasswordEncoder is the base class for all password encoders.
|
||||
@ -79,6 +79,6 @@ abstract class BasePasswordEncoder implements PasswordEncoderInterface
|
||||
*/
|
||||
protected function comparePasswords($password1, $password2)
|
||||
{
|
||||
return String::equals($password1, $password2);
|
||||
return StringUtils::equals($password1, $password2);
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ namespace Symfony\Component\Security\Core\Util;
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
final class String
|
||||
final class StringUtils
|
||||
{
|
||||
private final function __construct()
|
||||
{
|
@ -2,13 +2,13 @@
|
||||
|
||||
namespace Symfony\Component\Security\Tests\Core\Util;
|
||||
|
||||
use Symfony\Component\Security\Core\Util\String;
|
||||
use Symfony\Component\Security\Core\Util\StringUtils;
|
||||
|
||||
class StringTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testEquals()
|
||||
{
|
||||
$this->assertTrue(String::equals('password', 'password'));
|
||||
$this->assertFalse(String::equals('password', 'foo'));
|
||||
$this->assertTrue(StringUtils::equals('password', 'password'));
|
||||
$this->assertFalse(StringUtils::equals('password', 'foo'));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user