/** * Tests creating an authentication token. */ 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()); }