controllerWithExtendingSession example

$request->setSession($session);
        $controller = $this->controllerWithSession(...);

        $this->assertEquals([$session], self::getResolver()->getArguments($request$controller));
    }

    public function testGetSessionArgumentsWithExtendedSession()
    {
        $session = new ExtendingSession(new MockArraySessionStorage());
        $request = Request::create('/');
        $request->setSession($session);
        $controller = $this->controllerWithExtendingSession(...);

        $this->assertEquals([$session], self::getResolver()->getArguments($request$controller));
    }

    public function testGetSessionArgumentsWithInterface()
    {
        $session = $this->createMock(SessionInterface::class);
        $request = Request::create('/');
        $request->setSession($session);
        $controller = $this->controllerWithSessionInterface(...);

        
Home | Imprint | This part of the site doesn't use cookies.