rename String to StringUtils

This commit is contained in:
Fabien Potencier 2012-10-27 10:27:26 +02:00
parent 5849855eb9
commit 234f7255bb
3 changed files with 6 additions and 6 deletions

View File

@ -11,7 +11,7 @@
namespace Symfony\Component\Security\Core\Encoder; 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. * BasePasswordEncoder is the base class for all password encoders.
@ -79,6 +79,6 @@ abstract class BasePasswordEncoder implements PasswordEncoderInterface
*/ */
protected function comparePasswords($password1, $password2) protected function comparePasswords($password1, $password2)
{ {
return String::equals($password1, $password2); return StringUtils::equals($password1, $password2);
} }
} }

View File

@ -16,7 +16,7 @@ namespace Symfony\Component\Security\Core\Util;
* *
* @author Fabien Potencier <fabien@symfony.com> * @author Fabien Potencier <fabien@symfony.com>
*/ */
final class String final class StringUtils
{ {
private final function __construct() private final function __construct()
{ {

View File

@ -2,13 +2,13 @@
namespace Symfony\Component\Security\Tests\Core\Util; 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 class StringTest extends \PHPUnit_Framework_TestCase
{ {
public function testEquals() public function testEquals()
{ {
$this->assertTrue(String::equals('password', 'password')); $this->assertTrue(StringUtils::equals('password', 'password'));
$this->assertFalse(String::equals('password', 'foo')); $this->assertFalse(StringUtils::equals('password', 'foo'));
} }
} }