/** * @test * @expectedException \TYPO3\Flow\Security\Exception\UnsupportedAuthenticationTokenException */ public function authenticatingAnUnsupportedTokenThrowsAnException() { $someNiceToken = $this->getMock('TYPO3\\Flow\\Security\\Authentication\\TokenInterface'); $authenticationProvider = new FileBasedSimpleKeyProvider('myProvider'); $authenticationProvider->authenticate($someNiceToken); }
/** * @test * @expectedException \TYPO3\Flow\Security\Exception\UnsupportedAuthenticationTokenException */ public function authenticatingAnUnsupportedTokenThrowsAnException() { $someInvalidToken = $this->getMock(\TYPO3\Flow\Security\Authentication\TokenInterface::class); $authenticationProvider = new FileBasedSimpleKeyProvider('myProvider'); $authenticationProvider->authenticate($someInvalidToken); }