tests/Http/Cookie/SessionTest.php
/**
     * Tests the ability to check if a key exists and contains a value.
     */
Tests the ability to check if a key exists and contains a value.
Tests the ability to check if a key exists and contains a value .
public function testSessionHas()
    {
        $this->assertFalse($this->session->has('testSessionHas'));
        $this->session->put('testSessionHas', true);
        $this->session->put('testSessionHasNull', null);
        $this->assertTrue($this->session->has('testSessionHas'));
        $this->assertFalse($this->session->has('testSessionHasNull'));
    }
public function testSessionHas ( ) { $ this -> assertFalse ( $ this -> session -> has ( 'testSessionHas' ) ) ; $ this -> session -> put ( 'testSessionHas' , true ) ; $ this -> session -> put ( 'testSessionHasNull' , null ) ; $ this -> assertTrue ( $ this -> session -> has ( 'testSessionHas' ) ) ; $ this -> assertFalse ( $ this -> session -> has ( 'testSessionHasNull' ) ) ; }
Tests the ability to check if a key exists and contains a value.
Tests the ability to check if a key exists and contains a value .
// Should return false if the session doesn't have the key // Put data // Should return true for values that exist and are [not] null // Should return false if the value exists but [is] null