From 33f8bc67a6c822e412fe58a3b69ad30f7d0fbf19 Mon Sep 17 00:00:00 2001 From: franck Date: Tue, 9 Jul 2013 11:51:14 +0200 Subject: [PATCH] removed obsolete security tests --- .../Core/Security/SecurityManagerTest.php | 49 ------------------- .../Token/UsernamePasswordTokenTest.php | 38 -------------- 2 files changed, 87 deletions(-) delete mode 100644 core/lib/Thelia/Tests/Core/Security/SecurityManagerTest.php delete mode 100644 core/lib/Thelia/Tests/Core/Security/Token/UsernamePasswordTokenTest.php diff --git a/core/lib/Thelia/Tests/Core/Security/SecurityManagerTest.php b/core/lib/Thelia/Tests/Core/Security/SecurityManagerTest.php deleted file mode 100644 index 84cb0d1ef..000000000 --- a/core/lib/Thelia/Tests/Core/Security/SecurityManagerTest.php +++ /dev/null @@ -1,49 +0,0 @@ -. */ -/* */ -/*************************************************************************************/ - -namespace Thelia\Tests\Security; - -use Thelia\Core\Security\SecurityManager; -/** - * - * @author Franck Allimant - * - */ -class SecurityManagerTest extends \PHPUnit_Framework_TestCase -{ - public function testGetSetToken() - { - /* - $context = new SecurityManager($authProvider)( - $this->getMock('AuthenticationProviderInterface'), - $this->getMock('Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface') - ); - $this->assertNull($context->getToken()); - - $context->setToken($token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')); - $this->assertSame($token, $context->getToken()); - */ - // $this->assertFalse(1==1, "faux !"); - } -} diff --git a/core/lib/Thelia/Tests/Core/Security/Token/UsernamePasswordTokenTest.php b/core/lib/Thelia/Tests/Core/Security/Token/UsernamePasswordTokenTest.php deleted file mode 100644 index 147c5b816..000000000 --- a/core/lib/Thelia/Tests/Core/Security/Token/UsernamePasswordTokenTest.php +++ /dev/null @@ -1,38 +0,0 @@ -assertFalse($token->isAuthenticated()); - - $token = new UsernamePasswordToken('username', 'password', true); - $this->assertTrue($token->isAuthenticated()); - } - - /** - * @expectedException LogicException - */ - public function testSetAuthenticatedToTrue() - { - $token = new UsernamePasswordToken('foo', 'bar', true); - $token->setAuthenticated(true); - } - - public function testSetAuthenticatedToFalse() - { - $token = new UsernamePasswordToken('foo', 'bar', true); - $token->setAuthenticated(false); - $this->assertFalse($token->isAuthenticated()); - } - - public function testEraseCredentials() - { - $token = new UsernamePasswordToken('foo', 'bar', true); - $token->eraseCredentials(); - $this->assertEquals('', $token->getCredentials()); - } -} \ No newline at end of file