diff options
Diffstat (limited to 'Csrf/Tests/TokenGenerator/UriSafeTokenGeneratorTest.php')
-rw-r--r-- | Csrf/Tests/TokenGenerator/UriSafeTokenGeneratorTest.php | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/Csrf/Tests/TokenGenerator/UriSafeTokenGeneratorTest.php b/Csrf/Tests/TokenGenerator/UriSafeTokenGeneratorTest.php index 1b325e5..320dfc8 100644 --- a/Csrf/Tests/TokenGenerator/UriSafeTokenGeneratorTest.php +++ b/Csrf/Tests/TokenGenerator/UriSafeTokenGeneratorTest.php @@ -28,11 +28,6 @@ class UriSafeTokenGeneratorTest extends \PHPUnit_Framework_TestCase private static $bytes; /** - * @var \PHPUnit_Framework_MockObject_MockObject - */ - private $random; - - /** * @var UriSafeTokenGenerator */ private $generator; @@ -44,23 +39,16 @@ class UriSafeTokenGeneratorTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->random = $this->getMock('Symfony\Component\Security\Core\Util\SecureRandomInterface'); - $this->generator = new UriSafeTokenGenerator($this->random, self::ENTROPY); + $this->generator = new UriSafeTokenGenerator(self::ENTROPY); } protected function tearDown() { - $this->random = null; $this->generator = null; } public function testGenerateToken() { - $this->random->expects($this->once()) - ->method('nextBytes') - ->with(self::ENTROPY / 8) - ->will($this->returnValue(self::$bytes)); - $token = $this->generator->generateToken(); $this->assertTrue(ctype_print($token), 'is printable'); |