Adds test for session set magic method

This commit is contained in:
Vivek Dinesh 2017-05-23 19:53:51 +05:30
parent bad6d87f6c
commit 4fec952d6c
No known key found for this signature in database
GPG Key ID: 5ACE32C1981CAE6B

View File

@ -175,6 +175,17 @@ class SessionTest extends \CIUnitTestCase
$this->assertFalse(isset($_SESSION['bar']));
}
public function testSetMagicMethod()
{
$session = $this->getInstance();
$session->start();
$session->foo = 'bar';
$this->assertTrue(isset($_SESSION['foo']));
$this->assertEquals('bar', $_SESSION['foo']);
}
public function testCanFlashData()
{
$session = $this->getInstance();