From 9601b581dcf7fd9fdc0e41262b577c5a439d8c0d Mon Sep 17 00:00:00 2001 From: REJack Date: Fri, 7 Dec 2018 09:52:51 +0100 Subject: [PATCH] updated Aauth/ErrorsTest.php & removed AauthTest.php --- tests/Aauth/Libraries/Aauth/ErrorsTest.php | 4 +- tests/Aauth/Libraries/AauthTest.php | 64 ---------------------- 2 files changed, 2 insertions(+), 66 deletions(-) delete mode 100644 tests/Aauth/Libraries/AauthTest.php diff --git a/tests/Aauth/Libraries/Aauth/ErrorsTest.php b/tests/Aauth/Libraries/Aauth/ErrorsTest.php index 3bc45a0..220690d 100644 --- a/tests/Aauth/Libraries/Aauth/ErrorsTest.php +++ b/tests/Aauth/Libraries/Aauth/ErrorsTest.php @@ -66,8 +66,8 @@ class ErrorsTest extends \CIUnitTestCase { $session = $this->getInstance(); $this->library = new Aauth(NULL, $session); - $this->assertCount(0, $this->session->errors); + $this->assertCount(0, $this->session->get('errors')); $this->library->error('test message 1', true); - $this->assertCount(1, $this->session->errors); + $this->assertCount(1, $this->session->get('errors')); } } diff --git a/tests/Aauth/Libraries/AauthTest.php b/tests/Aauth/Libraries/AauthTest.php deleted file mode 100644 index 781a452..0000000 --- a/tests/Aauth/Libraries/AauthTest.php +++ /dev/null @@ -1,64 +0,0 @@ - 'CodeIgniter\Session\Handlers\FileHandler', - 'sessionCookieName' => 'ci_session', - 'sessionExpiration' => 7200, - 'sessionSavePath' => 'null', - 'sessionMatchIP' => false, - 'sessionTimeToUpdate' => 300, - 'sessionRegenerateDestroy' => false, - 'cookieDomain' => '', - 'cookiePrefix' => '', - 'cookiePath' => '/', - 'cookieSecure' => false, - ]; - - $config = (object)$defaults; - - $session = new MockSession(new FileHandler($config, Services::request()->getIPAddress()), $config); - $session->setLogger(new TestLogger(new Logger())); - $session->start(); - - return $session; - } - - //-------------------------------------------------------------------- - - public function testIsLoggedIn() - { - $session = $this->getInstance(); - - $this->library = new Aauth(NULL, $session); - - $this->assertFalse($this->library->isLoggedIn()); - } -}