Neos\Flow\Tests\Unit\Session\SessionTest::remoteSessionUsesStorageIdentifierPassedToConstructor PHP Method

remoteSessionUsesStorageIdentifierPassedToConstructor() public method

    public function remoteSessionUsesStorageIdentifierPassedToConstructor()
    {
        $storageIdentifier = '6e988eaa-7010-4ee8-bfb8-96ea4b40ec16';
        $session = new Session('ZPjPj3A0Opd7JeDoe7rzUQYCoDMcxscb', $storageIdentifier, 1354293259, []);
        $metaDataCache = $this->createCache('Meta');
        $storageCache = $this->createCache('Storage');
        $this->inject($session, 'bootstrap', $this->mockBootstrap);
        $this->inject($session, 'settings', $this->settings);
        $this->inject($session, 'metaDataCache', $metaDataCache);
        $this->inject($session, 'storageCache', $storageCache);
        $session->initializeObject();
        $this->assertFalse($session->hasKey('some key'));
        $session->putData('some key', 'some value');
        $this->assertEquals('some value', $session->getData('some key'));
        $this->assertTrue($session->hasKey('some key'));
        $this->assertTrue($storageCache->has($storageIdentifier . md5('some key')));
    }
SessionTest