diff options
author | ctrlaltca <ctrlaltca@gmail.com> | 2014-08-26 16:59:21 +0200 |
---|---|---|
committer | ctrlaltca <ctrlaltca@gmail.com> | 2014-08-26 16:59:21 +0200 |
commit | 74b31be9515eddfa63005d6760614badfaba9fea (patch) | |
tree | 47c952901dcb5eccd6dd8b7c6ee7e0b6bf176510 /tests/unit/Security/TAuthManagerTest.php | |
parent | 2b11341614ac4a15be697fa8acad07055154ac54 (diff) | |
parent | 0c5026b55cde5c104f10686afd8b441568175d38 (diff) |
Backports for Prado 3.2.4
Diffstat (limited to 'tests/unit/Security/TAuthManagerTest.php')
-rw-r--r-- | tests/unit/Security/TAuthManagerTest.php | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/tests/unit/Security/TAuthManagerTest.php b/tests/unit/Security/TAuthManagerTest.php index 03244a22..3b8b9305 100644 --- a/tests/unit/Security/TAuthManagerTest.php +++ b/tests/unit/Security/TAuthManagerTest.php @@ -8,7 +8,7 @@ Prado::using('System.Xml.TXmlDocument'); * @package System.Security */ class TAuthManagerTest extends PHPUnit_Framework_TestCase { - + public static $app = null; public static $usrMgr = null; @@ -18,7 +18,7 @@ class TAuthManagerTest extends PHPUnit_Framework_TestCase { if(self::$app === null) { self::$app = new TApplication(dirname(__FILE__).'/app'); } - + // Make a fake user manager module if (self::$usrMgr === null) { self::$usrMgr=new TUserManager (); @@ -39,26 +39,26 @@ class TAuthManagerTest extends PHPUnit_Framework_TestCase { $authManager->init(null); self::fail ('Expected TConfigurationException not thrown'); } catch (TConfigurationException $e) {} - + $authManager->setUserManager('users'); $authManager->init (null); self::assertEquals(self::$usrMgr, $authManager->getUserManager()); } - + public function testUserManager() { $authManager=new TAuthManager (); $authManager->setUserManager('users'); $authManager->init(null); self::assertEquals(self::$usrMgr, $authManager->getUserManager()); - + // test change try { $authManager->setUserManager('invalid'); self::fail ('Expected TInvalidOperationException not thrown'); } catch (TInvalidOperationException $e) {} - + } - + public function testLoginPage() { $authManager=new TAuthManager (); $authManager->setUserManager('users'); @@ -66,7 +66,7 @@ class TAuthManagerTest extends PHPUnit_Framework_TestCase { $authManager->setLoginPage ('LoginPage'); self::assertEquals('LoginPage', $authManager->getLoginPage()); } - + public function testDoAuthentication() { throw new PHPUnit_Framework_IncompleteTestError(); // Not yet finished, Session won't start because of headers :( :( @@ -76,41 +76,40 @@ class TAuthManagerTest extends PHPUnit_Framework_TestCase { $authManager->init(null); $authManager->setLoginPage ('LoginPage'); self::$app->raiseEvent ('onAuthentication', self::$app, null); - + } - + public function testDoAuthorization() { throw new PHPUnit_Framework_IncompleteTestError(); } - + public function testLeave() { throw new PHPUnit_Framework_IncompleteTestError(); } - + public function testReturnUrl() { throw new PHPUnit_Framework_IncompleteTestError(); } - + public function testOnAuthenticate() { throw new PHPUnit_Framework_IncompleteTestError(); } - + public function testOnAuthorize() { throw new PHPUnit_Framework_IncompleteTestError(); } - + public function testUpdateSessionUser() { throw new PHPUnit_Framework_IncompleteTestError(); } - + public function testLogin() { throw new PHPUnit_Framework_IncompleteTestError(); } - + public function testLogout() { throw new PHPUnit_Framework_IncompleteTestError(); } } -?> |