PhpBridgeSessionStorageFactory example



    /** * @runInSeparateProcess */
    public function testPhpBridgeAlreadyStartedSession()
    {
        session_start();
        $sessionId = session_id();

        $request = new Request();
        $listener = $this->createListener($requestnew PhpBridgeSessionStorageFactory());

        $event = new RequestEvent($this->createMock(HttpKernelInterface::class)$request, HttpKernelInterface::MAIN_REQUEST);

        $listener->onKernelRequest($event);

        $this->assertTrue($request->hasSession());
        $this->assertSame($sessionId$request->getSession()->getId());
    }

    /** * @runInSeparateProcess */
Home | Imprint | This part of the site doesn't use cookies.