tests/Http/Cookie/SessionTest.php
/**
     * Tests the ability to retrieve and automatically forget stored data.
     */
Tests the ability to retrieve and automatically forget stored data.
Tests the ability to retrieve and automatically forget stored data .
public function testSessionPull()
    {
        $this->assertNull($this->session->pull('testSessionPull'));
        $this->assertTrue($this->session->pull('testSessionPull', true));
        $this->session->put('testSessionPull', true);
        $this->assertTrue($this->session->pull('testSessionPull'));
        $this->assertNull($this->session->get('testSessionPull'));
    }
public function testSessionPull ( ) { $ this -> assertNull ( $ this -> session -> pull ( 'testSessionPull' ) ) ; $ this -> assertTrue ( $ this -> session -> pull ( 'testSessionPull' , true ) ) ; $ this -> session -> put ( 'testSessionPull' , true ) ; $ this -> assertTrue ( $ this -> session -> pull ( 'testSessionPull' ) ) ; $ this -> assertNull ( $ this -> session -> get ( 'testSessionPull' ) ) ; }
Tests the ability to retrieve and automatically forget stored data.
Tests the ability to retrieve and automatically forget stored data .
// Nonexistent keys should return null (or second parameter value if specified) // Put data // Pull and verify the data is correct // Verify the key was forgotten