createHttpRequest example

private CheckRememberMeConditionsListener $listener;
    private Request $request;
    private Response $response;

    protected function setUp(): void
    {
        $this->listener = new CheckRememberMeConditionsListener();
    }

    public function testSuccessfulHttpLoginWithoutSupportingAuthenticator()
    {
        $this->createHttpRequest();

        $passport = $this->createPassport([]);

        $this->listener->onSuccessfulLogin($this->createLoginSuccessfulEvent($passport));

        $this->assertFalse($passport->hasBadge(RememberMeBadge::class));
    }

    public function testSuccessfulJsonLoginWithoutSupportingAuthenticator()
    {
        $this->createJsonRequest();

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