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

lastActivityTimestampOfNewSessionIsSetAndStoredCorrectlyAndCanBeRetrieved() public method

    public function lastActivityTimestampOfNewSessionIsSetAndStoredCorrectlyAndCanBeRetrieved()
    {
        $metaDataCache = $this->createCache('Meta');
        $storageCache = $this->createCache('Storage');
        /** @var Session $session */
        $session = $this->getAccessibleMock(Session::class, array('dummy'));
        $this->inject($session, 'bootstrap', $this->mockBootstrap);
        $this->inject($session, 'objectManager', $this->mockObjectManager);
        $this->inject($session, 'settings', $this->settings);
        $this->inject($session, 'metaDataCache', $metaDataCache);
        $this->inject($session, 'storageCache', $storageCache);
        $session->initializeObject();
        $now = $session->_get('now');
        $session->start();
        $sessionIdentifier = $session->getId();
        $this->assertEquals($now, $session->getLastActivityTimestamp());
        $session->close();
        $sessionInfo = $metaDataCache->get($sessionIdentifier);
        $this->assertEquals($now, $sessionInfo['lastActivityTimestamp']);
    }
SessionTest