From 8dfe7684591978d2364fbea28b231392445cc0ec Mon Sep 17 00:00:00 2001 From: Cameron Date: Mon, 18 Mar 2019 12:10:10 -0700 Subject: [PATCH] e_signup_classTest and UserHandlerTest placeholders. --- tests/unit/UserHandlerTest.php | 155 ++++++++++++++++++++++++++++++ tests/unit/e_signup_classTest.php | 85 ++++++++++++++++ 2 files changed, 240 insertions(+) create mode 100644 tests/unit/UserHandlerTest.php create mode 100644 tests/unit/e_signup_classTest.php diff --git a/tests/unit/UserHandlerTest.php b/tests/unit/UserHandlerTest.php new file mode 100644 index 000000000..80d98e841 --- /dev/null +++ b/tests/unit/UserHandlerTest.php @@ -0,0 +1,155 @@ +usr = $this->make('UserHandler'); + } + catch(Exception $e) + { + $this->assertTrue(false, "Couldn't load UserHandler object"); + } + + } + +/* + public function testCheckPassword() + { + + } + + public function testDeleteExpired() + { + + } + + public function testIsPasswordRequired() + { + + } + + public function testAddCommonClasses() + { + + } + + public function test__construct() + { + + } + + public function testResetPassword() + { + + } + + public function testMakeUserCookie() + { + + } + + public function testUserValidation() + { + + } + + public function testConvertPassword() + { + + } + + public function testHasReadonlyField() + { + + } + + public function testRehashPassword() + { + + } + + public function testNeedEmailPassword() + { + + } + + public function testHashPassword() + { + + } + + public function testCanConvert() + { + + } + + public function testCheckCHAP() + { + + } + + public function testUserClassUpdate() + { + + } + + public function testGetHashType() + { + + } + + public function testGenerateUserLogin() + { + + } + + public function testGenerateRandomString() + { + + } + + public function testGetDefaultHashType() + { + + } + + public function testPasswordAPIExists() + { + + } + + public function testAddNonDefaulted() + { + + } + + public function testGetNiceNames() + { + + } + + public function testUserStatusUpdate() + { + + } + +*/ + + } diff --git a/tests/unit/e_signup_classTest.php b/tests/unit/e_signup_classTest.php new file mode 100644 index 000000000..d4675b5f3 --- /dev/null +++ b/tests/unit/e_signup_classTest.php @@ -0,0 +1,85 @@ +sup = $this->make('e_signup_class'); + } + catch(Exception $e) + { + $this->assertTrue(false, "Couldn't load e_signup_class object"); + } + + $this->sup->__construct(); + + } + + + public function testRenderEmailPreview() + { + + } + + public function test__construct() + { + + } + + public function testRender_after_signup() + { + + } + + public function testProcessActivationLink() + { + $sess = '1234567890'; + $insert = array( + 'user_id' => 0, + 'user_name' => 'e_signup_class', + 'user_loginname' => 'e_signup', + 'user_email' => 'test@test.com', + 'user_sess' => $sess, + 'user_ban' => 1, + ); + + $num = e107::getDb()->insert('user', $insert); + + $this->assertGreaterThan(0,$num); + + + + $result = $this->sup->processActivationLink('activate.'.$num.'.'.$sess); + $this->assertEquals('success', $result); + + $result = $this->sup->processActivationLink('activate.'.$num.'.'.$sess); + $this->assertEquals('exists', $result); + + $result = $this->sup->processActivationLink('activate.999.'.$sess); + $this->assertEquals('invalid', $result); + + $this->sup->processActivationLink('activate.999.'.$sess.".fr"); + $this->assertEquals("Privacy Policy", LAN_SIGNUP_122, "Language file failed to load."); + + + } + + + + }