示例#1
0
 public function testGetSetFlash()
 {
     $this->assertNull($this->session->getFlash('notice'));
     $this->assertEquals('default', $this->session->getFlash('notice', 'default'));
     $this->session->setFlash('notice', 'foo');
     $this->assertEquals('foo', $this->session->getFlash('notice'));
     $this->assertNull($this->session->getFlash('notice'));
 }
示例#2
0
 public function testGetSetFlash()
 {
     $this->assertNull($this->session->getFlash('notice'));
     $this->assertEquals('default', $this->session->getFlash('notice', 'default'));
     $this->session->getFlashBag()->add('notice', 'foo');
     $this->session->getFlashBag()->add('notice', 'foo2');
     // test that BC works by only retrieving the first added.
     $this->assertEquals('foo', $this->session->getFlash('notice'));
     $this->assertNull($this->session->getFlash('notice'));
 }
示例#3
0
 public function testGetSetFlash()
 {
     set_error_handler(array($this, "deprecationErrorHandler"));
     $this->assertNull($this->session->getFlash('notice'));
     $this->assertEquals('default', $this->session->getFlash('notice', 'default'));
     $this->session->getFlashBag()->add('notice', 'foo');
     $this->session->getFlashBag()->add('notice', 'foo2');
     // test that BC works by only retrieving the first added.
     $this->assertEquals('foo', $this->session->getFlash('notice'));
     $this->assertNull($this->session->getFlash('notice'));
     restore_error_handler();
 }