Example #1
0
 /**
  * @issue #4 add session flash method
  * @ref https://github.com/Wandu/Http/issues/4
  */
 public function testFlash()
 {
     $this->session->flash('flash', 'hello world!');
     $this->assertEquals('hello world!', $this->session->get('flash'));
     $this->assertNull($this->session->get('flash'));
 }
Example #2
0
 public function testToArrayWithFlash()
 {
     $this->session->flash('flash', 'hello world!');
     static::assertEquals(['flash' => 'hello world!', 'id' => 37, 'username' => 'wan2land'], $this->session->toArray());
     static::assertEquals(['id' => 37, 'username' => 'wan2land'], $this->session->toArray());
 }