tests/Http/Cookie/SessionTest.php
/**
     * Tests the ability to reflash specific keys for the next pageload.
     */
Tests the ability to reflash specific keys for the next pageload.
Tests the ability to reflash specific keys for the next pageload .
public function testSessionReflashKeep()
    {
        $this->session->flash('testFlashKey', true);
        $this->session->flash('forgetThisKey', true);
        $secondPageSession = new Session();
        $secondPageSession->keep(array('testFlashKey'));
        $thirdPageSession = new Session();
        $this->assertTrue($thirdPageSession->get('testFlashKey'));
        $this->assertNull($thirdPageSession->get('forgetThisKey'));
    }
public function testSessionReflashKeep ( ) { $ this -> session -> flash ( 'testFlashKey' , true ) ; $ this -> session -> flash ( 'forgetThisKey' , true ) ; $ secondPageSession = new Session ( ) ; $ secondPageSession -> keep ( array ( 'testFlashKey' ) ) ; $ thirdPageSession = new Session ( ) ; $ this -> assertTrue ( $ thirdPageSession -> get ( 'testFlashKey' ) ) ; $ this -> assertNull ( $ thirdPageSession -> get ( 'forgetThisKey' ) ) ; }
Tests the ability to reflash specific keys for the next pageload.
Tests the ability to reflash specific keys for the next pageload .
// Store flash data // Create new session to simulate second pageload // Reflash // Create new session to simulate third pageload // Third page should still have the testFlashKey key, but not forgetThisKey