summaryrefslogtreecommitdiff
path: root/tests/unit/Security
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/Security')
-rw-r--r--tests/unit/Security/AllTests.php35
-rw-r--r--tests/unit/Security/TAuthManagerTest.php67
-rw-r--r--tests/unit/Security/TAuthorizationRuleTest.php51
-rw-r--r--tests/unit/Security/TSecurityManagerTest.php59
-rw-r--r--tests/unit/Security/TUserManagerTest.php55
-rw-r--r--tests/unit/Security/TUserTest.php59
6 files changed, 326 insertions, 0 deletions
diff --git a/tests/unit/Security/AllTests.php b/tests/unit/Security/AllTests.php
new file mode 100644
index 00000000..7de0996f
--- /dev/null
+++ b/tests/unit/Security/AllTests.php
@@ -0,0 +1,35 @@
+<?php
+require_once dirname(__FILE__).'/../phpunit.php';
+
+if(!defined('PHPUnit_MAIN_METHOD')) {
+ define('PHPUnit_MAIN_METHOD', 'Security_AllTests::main');
+}
+
+require_once 'TAuthManagerTest.php';
+require_once 'TAuthorizationRuleTest.php';
+require_once 'TSecurityManagerTest.php';
+require_once 'TUserManagerTest.php';
+require_once 'TUserTest.php';
+
+class Security_AllTests {
+ public static function main() {
+ PHPUnit_TextUI_TestRunner::run(self::suite());
+ }
+
+ public static function suite() {
+ $suite = new PHPUnit_Framework_TestSuite('System.Security');
+
+ $suite->addTestSuite('TAuthManagerTest');
+ $suite->addTestSuite('TAuthorizationRuleTest');
+ $suite->addTestSuite('TSecurityManagerTest');
+ $suite->addTestSuite('TUserManagerTest');
+ $suite->addTestSuite('TUserTest');
+
+ return $suite;
+ }
+}
+
+if(PHPUnit_MAIN_METHOD == 'Security_AllTests::main') {
+ Security_AllTests::main();
+}
+?>
diff --git a/tests/unit/Security/TAuthManagerTest.php b/tests/unit/Security/TAuthManagerTest.php
new file mode 100644
index 00000000..6e3c05a9
--- /dev/null
+++ b/tests/unit/Security/TAuthManagerTest.php
@@ -0,0 +1,67 @@
+<?php
+require_once dirname(__FILE__).'/../phpunit.php';
+
+Prado::using('System.Security.TAuthManager');
+
+/**
+ * @package System.Security
+ */
+class TAuthManagerTest extends PHPUnit_Framework_TestCase {
+
+ public function setUp() {
+ }
+
+ public function tearDown() {
+ }
+
+ public function testInit() {
+ throw new PHPUnit_Framework_IncompleteTestError();
+ }
+
+ public function testUserManager() {
+ throw new PHPUnit_Framework_IncompleteTestError();
+ }
+
+ public function testLoginPage() {
+ throw new PHPUnit_Framework_IncompleteTestError();
+ }
+
+ public function testDoAuthentication() {
+ throw new PHPUnit_Framework_IncompleteTestError();
+ }
+
+ 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();
+ }
+
+}
+
+?>
diff --git a/tests/unit/Security/TAuthorizationRuleTest.php b/tests/unit/Security/TAuthorizationRuleTest.php
new file mode 100644
index 00000000..e20542dc
--- /dev/null
+++ b/tests/unit/Security/TAuthorizationRuleTest.php
@@ -0,0 +1,51 @@
+<?php
+require_once dirname(__FILE__).'/../phpunit.php';
+
+Prado::using('System.Security.TAuthorizationRule');
+
+/**
+ * @package System.Security
+ */
+class TAuthorizationRuleTest extends PHPUnit_Framework_TestCase {
+
+ public function setUp() {
+ }
+
+ public function tearDown() {
+ }
+
+ public function testConstruct() {
+ throw new PHPUnit_Framework_IncompleteTestError();
+ }
+
+ public function testAction() {
+ throw new PHPUnit_Framework_IncompleteTestError();
+ }
+
+ public function testUsers() {
+ throw new PHPUnit_Framework_IncompleteTestError();
+ }
+
+ public function testRoles() {
+ throw new PHPUnit_Framework_IncompleteTestError();
+ }
+
+ public function testVerb() {
+ throw new PHPUnit_Framework_IncompleteTestError();
+ }
+
+ public function testGuestApplied() {
+ throw new PHPUnit_Framework_IncompleteTestError();
+ }
+
+ public function testEveryoneApplied() {
+ throw new PHPUnit_Framework_IncompleteTestError();
+ }
+
+ public function testIsUserAllowed() {
+ throw new PHPUnit_Framework_IncompleteTestError();
+ }
+
+}
+
+?>
diff --git a/tests/unit/Security/TSecurityManagerTest.php b/tests/unit/Security/TSecurityManagerTest.php
new file mode 100644
index 00000000..76029bde
--- /dev/null
+++ b/tests/unit/Security/TSecurityManagerTest.php
@@ -0,0 +1,59 @@
+<?php
+require_once dirname(__FILE__).'/../phpunit.php';
+
+Prado::using('System.Security.TSecurityManager');
+
+/**
+ * @package System.Security
+ */
+class TSecurityManagerTest extends PHPUnit_Framework_TestCase {
+
+ public function setUp() {
+ }
+
+ public function tearDown() {
+ }
+
+ public function testInit() {
+ throw new PHPUnit_Framework_IncompleteTestError();
+ }
+
+ public function testValidationKey() {
+ throw new PHPUnit_Framework_IncompleteTestError();
+ }
+
+ public function testEncryptionKey() {
+ throw new PHPUnit_Framework_IncompleteTestError();
+ }
+
+ public function testValidation() {
+ throw new PHPUnit_Framework_IncompleteTestError();
+ }
+
+ public function testEncryption() {
+ throw new PHPUnit_Framework_IncompleteTestError();
+ }
+
+ public function testEncrypt() {
+ throw new PHPUnit_Framework_IncompleteTestError();
+ }
+
+ public function testDecrypt() {
+ throw new PHPUnit_Framework_IncompleteTestError();
+ }
+
+ public function testHashData() {
+ throw new PHPUnit_Framework_IncompleteTestError();
+ }
+
+ public function testValidateData() {
+ throw new PHPUnit_Framework_IncompleteTestError();
+ }
+
+ public function testComputeHMAC() {
+ throw new PHPUnit_Framework_IncompleteTestError();
+ }
+
+}
+
+?>
diff --git a/tests/unit/Security/TUserManagerTest.php b/tests/unit/Security/TUserManagerTest.php
new file mode 100644
index 00000000..8937ba22
--- /dev/null
+++ b/tests/unit/Security/TUserManagerTest.php
@@ -0,0 +1,55 @@
+<?php
+require_once dirname(__FILE__).'/../phpunit.php';
+
+Prado::using('System.Security.TUserManager');
+
+/**
+ * @package System.Security
+ */
+class TUserManagerTest extends PHPUnit_Framework_TestCase {
+
+ public function setUp() {
+ }
+
+ public function tearDown() {
+ }
+
+ public function testInit() {
+ throw new PHPUnit_Framework_IncompleteTestError();
+ }
+
+ public function testUsers() {
+ throw new PHPUnit_Framework_IncompleteTestError();
+ }
+
+ public function testRoles() {
+ throw new PHPUnit_Framework_IncompleteTestError();
+ }
+
+ public function testUserFile() {
+ throw new PHPUnit_Framework_IncompleteTestError();
+ }
+
+ public function testGuestName() {
+ throw new PHPUnit_Framework_IncompleteTestError();
+ }
+
+ public function testPasswordMode() {
+ throw new PHPUnit_Framework_IncompleteTestError();
+ }
+
+ public function testValidateUser() {
+ throw new PHPUnit_Framework_IncompleteTestError();
+ }
+
+ public function testUser() {
+ throw new PHPUnit_Framework_IncompleteTestError();
+ }
+
+ public function testSwitchToGuest() {
+ throw new PHPUnit_Framework_IncompleteTestError();
+ }
+
+}
+
+?>
diff --git a/tests/unit/Security/TUserTest.php b/tests/unit/Security/TUserTest.php
new file mode 100644
index 00000000..67ac6eb4
--- /dev/null
+++ b/tests/unit/Security/TUserTest.php
@@ -0,0 +1,59 @@
+<?php
+require_once dirname(__FILE__).'/../phpunit.php';
+
+Prado::using('System.Security.TUser');
+
+/**
+ * @package System.Security
+ */
+class TUserTest extends PHPUnit_Framework_TestCase {
+
+ public function setUp() {
+ }
+
+ public function tearDown() {
+ }
+
+ public function testConstruct() {
+ throw new PHPUnit_Framework_IncompleteTestError();
+ }
+
+ public function testManager() {
+ throw new PHPUnit_Framework_IncompleteTestError();
+ }
+
+ public function testName() {
+ throw new PHPUnit_Framework_IncompleteTestError();
+ }
+
+ public function testIsGuest() {
+ throw new PHPUnit_Framework_IncompleteTestError();
+ }
+
+ public function testRoles() {
+ throw new PHPUnit_Framework_IncompleteTestError();
+ }
+
+ public function testIsInRole() {
+ throw new PHPUnit_Framework_IncompleteTestError();
+ }
+
+ public function testSaveToString() {
+ throw new PHPUnit_Framework_IncompleteTestError();
+ }
+
+ public function testLoadFromString() {
+ throw new PHPUnit_Framework_IncompleteTestError();
+ }
+
+ public function testState() {
+ throw new PHPUnit_Framework_IncompleteTestError();
+ }
+
+ public function testStateChanged() {
+ throw new PHPUnit_Framework_IncompleteTestError();
+ }
+
+}
+
+?>