Exemplo n.º 1
0
 public function testHasWithFlash()
 {
     $this->session->flash('flash', 'hello world!');
     static::assertTrue($this->session->has('flash'));
     static::assertTrue($this->session->has('flash'));
     static::assertTrue($this->session->has('flash'));
     static::assertEquals('hello world!', $this->session->get('flash'));
     static::assertFalse($this->session->has('flash'));
     static::assertFalse($this->session->has('flash'));
     static::assertFalse($this->session->has('flash'));
     static::assertNull($this->session->get('flash'));
 }
Exemplo n.º 2
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'));
 }