Inheritance: implements Symfony\Component\DependencyInjection\ContainerAwareInterface, implements Symfony\Component\Security\Http\Authentication\SimplePreAuthenticatorInterface, use trait Contao\CoreBundle\Framework\ScopeAwareTrait
コード例 #1
0
 /**
  * Tests the token support.
  */
 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'));
 }