lithium\tests\cases\storage\session\adapter\MemoryTest::testKey PHP Method

testKey() public method

Tests if a correct (and unique) key is loaded upon request.
public testKey ( )
    public function testKey()
    {
        $key1 = Memory::key();
        $this->assertNotEmpty($key1);
        $key2 = Memory::key();
        $this->assertNotEqual($key1, $key2);
        $pattern = '/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/';
        $this->assertPattern($pattern, Memory::key());
    }