lithium\tests\cases\storage\session\adapter\MemoryTest::testCheck PHP Метод

testCheck() публичный Метод

Checks if the session data is empty on creation.
public testCheck ( )
    public function testCheck()
    {
        $this->Memory->read();
        $key = 'read';
        $value = 'value to be read';
        $this->Memory->_session[$key] = $value;
        $closure = $this->Memory->check($key);
        $this->assertInternalType('callable', $closure);
        $params = compact('key');
        $result = $closure($this->Memory, $params, null);
        $this->assertTrue($result);
        $key = 'does_not_exist';
        $closure = $this->Memory->check($key);
        $this->assertInternalType('callable', $closure);
        $params = compact('key');
        $result = $closure($this->Memory, $params, null);
        $this->assertFalse($result);
    }