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

twoSessionsDontConflictIfUsingSameEntryIdentifiers() public method

    public function twoSessionsDontConflictIfUsingSameEntryIdentifiers()
    {
        $metaDataCache = $this->createCache('Meta');
        $storageCache = $this->createCache('Storage');
        $session1 = new Session();
        $this->inject($session1, 'bootstrap', $this->mockBootstrap);
        $this->inject($session1, 'settings', $this->settings);
        $this->inject($session1, 'metaDataCache', $metaDataCache);
        $this->inject($session1, 'storageCache', $storageCache);
        $session1->initializeObject();
        $session1->start();
        $session2 = new Session();
        $this->inject($session2, 'bootstrap', $this->mockBootstrap);
        $this->inject($session2, 'settings', $this->settings);
        $this->inject($session2, 'metaDataCache', $metaDataCache);
        $this->inject($session2, 'storageCache', $storageCache);
        $session2->initializeObject();
        $session2->start();
        $session1->putData('foo', 'bar');
        $session2->putData('foo', 'baz');
        $this->assertEquals('bar', $session1->getData('foo'));
        $this->assertEquals('baz', $session2->getData('foo'));
    }
SessionTest