コード例 #1
0
ファイル: SessionTest.php プロジェクト: laubosslink/lab
 public function testRemoveFlash()
 {
     $this->session->setFlash('notice', 'foo');
     $this->session->setFlash('error', 'bar');
     $this->assertTrue($this->session->hasFlash('notice'));
     $this->session->removeFlash('error');
     $this->assertTrue($this->session->hasFlash('notice'));
     $this->assertFalse($this->session->hasFlash('error'));
 }
コード例 #2
0
ファイル: SessionTest.php プロジェクト: rodionrakib/twig
 public function testRemoveFlash()
 {
     set_error_handler(array($this, "deprecationErrorHandler"));
     $this->session->setFlash('notice', 'foo');
     $this->session->setFlash('error', 'bar');
     $this->assertTrue($this->session->hasFlash('notice'));
     $this->session->removeFlash('error');
     $this->assertTrue($this->session->hasFlash('notice'));
     $this->assertFalse($this->session->hasFlash('error'));
     restore_error_handler();
 }