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

getIdReturnsTheCurrentSessionIdentifier() public method

    public function getIdReturnsTheCurrentSessionIdentifier()
    {
        $session = new Session();
        $this->inject($session, 'bootstrap', $this->mockBootstrap);
        $this->inject($session, 'settings', $this->settings);
        $this->inject($session, 'metaDataCache', $this->createCache('Meta'));
        $this->inject($session, 'storageCache', $this->createCache('Storage'));
        $session->initializeObject();
        try {
            $session->getId();
            $this->fail('No exception thrown although the session was not started yet.');
        } catch (SessionNotStartedException $e) {
            $session->start();
            $this->assertEquals(32, strlen($session->getId()));
        }
    }
SessionTest