Contao\CoreBundle\Test\Security\ContaoAuthenticatorTest::testSupportsToken PHP Method

testSupportsToken() public method

Tests the token support.
public testSupportsToken ( )
    public function testSupportsToken()
    {
        $authenticator = new ContaoAuthenticator();
        $this->assertTrue($authenticator->supportsToken(new ContaoToken($this->mockUser()), 'frontend'));
        $this->assertTrue($authenticator->supportsToken(new AnonymousToken('anon.', 'foo'), 'frontend'));
        $this->assertFalse($authenticator->supportsToken(new PreAuthenticatedToken('foo', 'bar', 'console'), 'console'));
    }