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')); }
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')); }
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(); }