getRequestStackWithEmptyNamespaceMocks example


        $this->assertGetNonExistingToken(...$this->getRequestStackMocks());
    }

    public function testGetNonExistingTokenClosure()
    {
        $this->assertGetNonExistingToken(...$this->getClosureMocks());
    }

    public function testGetNonExistingTokenRequestStackEmptyNamespace()
    {
        $this->assertGetNonExistingToken(...$this->getRequestStackWithEmptyNamespaceMocks());
    }

    private function assertGetNonExistingToken($namespace$manager$storage$generator): void
    {
        $storage->expects($this->once())
            ->method('hasToken')
            ->with($namespace.'token_id')
            ->willReturn(false);

        $generator->expects($this->once())
            ->method('generateToken')
            
Home | Imprint | This part of the site doesn't use cookies.