Browse Source

updated Aauth/InfosTest.php

v3-dev
REJack 6 years ago
parent
commit
bd0a9e59c3
No known key found for this signature in database
GPG Key ID: 4A44B48700429F46
  1. 12
      tests/Aauth/Libraries/Aauth/InfosTest.php

12
tests/Aauth/Libraries/Aauth/InfosTest.php

@ -91,26 +91,26 @@ class InfosTest extends \CIUnitTestCase
$session = $this->getInstance(); $session = $this->getInstance();
$this->library = new Aauth(NULL, $session); $this->library = new Aauth(NULL, $session);
$this->library->info('test message 1', true); $this->library->info('test message 1', true);
$this->assertEquals(['test message 1'], $session->get('infos')); $this->assertEquals(['test message 1'], $session->getFlashdata('infos'));
$this->library->clearInfos(); $this->library->clearInfos();
$this->assertNull($session->get('infos')); $this->assertNull($session->getFlashdata('infos'));
} }
public function testInfosFlash() public function testInfosFlash()
{ {
$session = $this->getInstance(); $session = $this->getInstance();
$this->library = new Aauth(NULL, $session); $this->library = new Aauth(NULL, $session);
$this->assertNull($session->get('infos')); $this->assertNull($session->getFlashdata('infos'));
$this->library->info('test message 1', true); $this->library->info('test message 1', true);
$this->assertEquals(['test message 1'], $session->get('infos')); $this->assertEquals(['test message 1'], $session->getFlashdata('infos'));
} }
public function testInfosFlashArray() public function testInfosFlashArray()
{ {
$session = $this->getInstance(); $session = $this->getInstance();
$this->library = new Aauth(NULL, $session); $this->library = new Aauth(NULL, $session);
$this->assertNull($session->get('infos')); $this->assertNull($session->getFlashdata('infos'));
$this->library->info(['test message 1','test message 2'], true); $this->library->info(['test message 1','test message 2'], true);
$this->assertEquals(['test message 1','test message 2'], $session->get('infos')); $this->assertEquals(['test message 1','test message 2'], $session->getFlashdata('infos'));
} }
} }

Loading…
Cancel
Save