mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
Adds test for session set magic method
This commit is contained in:
parent
bad6d87f6c
commit
4fec952d6c
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user