Neos\Flow\Tests\Functional\Session\SessionManagementTest::getCurrentSessionReturnsTheCurrentlyActiveSession PHP Метод

getCurrentSessionReturnsTheCurrentlyActiveSession() публичный Метод

Checks if getCurrentSessionSession() returns the one and only session which can also be retrieved through Dependency Injection using the SessionInterface.
    public function getCurrentSessionReturnsTheCurrentlyActiveSession()
    {
        $injectedSession = $this->objectManager->get(Session\SessionInterface::class);
        $sessionManager = $this->objectManager->get(Session\SessionManagerInterface::class);
        $otherInjectedSession = $this->objectManager->get(Session\SessionInterface::class);
        $retrievedSession = $sessionManager->getCurrentSession();
        $this->assertSame($injectedSession, $retrievedSession);
        $this->assertSame($otherInjectedSession, $retrievedSession);
    }