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

testCreateToken() public method

Tests creating an authentication token.
public testCreateToken ( )
    public function testCreateToken()
    {
        $authenticator = new ContaoAuthenticator();
        $token = $authenticator->createToken(new Request(), 'frontend');
        $this->assertInstanceOf('Symfony\\Component\\Security\\Core\\Authentication\\Token\\AnonymousToken', $token);
        $this->assertEquals('frontend', $token->getSecret());
        $this->assertEquals('anon.', $token->getUsername());
    }