From aa82241e44631b66247cb17a8e0f1c3ffa51ad0e Mon Sep 17 00:00:00 2001 From: REJack Date: Fri, 7 Dec 2018 10:10:09 +0100 Subject: [PATCH] updated Aauth/ErrorsTest.php --- tests/Aauth/Libraries/Aauth/ErrorsTest.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tests/Aauth/Libraries/Aauth/ErrorsTest.php b/tests/Aauth/Libraries/Aauth/ErrorsTest.php index c78a059..97c38cd 100644 --- a/tests/Aauth/Libraries/Aauth/ErrorsTest.php +++ b/tests/Aauth/Libraries/Aauth/ErrorsTest.php @@ -55,8 +55,15 @@ class ErrorsTest extends \CIUnitTestCase public function testErrors() { - $session = $this->getInstance(); - $this->library = new Aauth(NULL, $session); + $this->library = new Aauth(NULL, TRUE); + $this->assertCount(0, $this->library->getErrorsArray()); + $this->library->error('test message 1'); + $this->assertCount(1, $this->library->getErrorsArray()); + } + + public function testgetErrorsArray() + { + $this->library = new Aauth(NULL, TRUE); $this->assertCount(0, $this->library->getErrorsArray()); $this->library->error('test message 1'); $this->assertCount(1, $this->library->getErrorsArray()); @@ -66,7 +73,7 @@ class ErrorsTest extends \CIUnitTestCase { $session = $this->getInstance(); $this->library = new Aauth(NULL, $session); - $this->assertFalse($session->get('errors')); + $this->assertNull($session->get('errors')); $this->library->error('test message 1', true); $this->assertCount(1, $session->get('errors')); }