public function setAuthenticated($isAuthenticated) { if ($isAuthenticated) { throw new \LogicException('Cannot set this token to trusted after instantiation.'); } parent::setAuthenticated(false); }
public function testSetAuthenticatedToFalse() { $token = new UsernamePasswordToken('foo', 'bar', 'key'); $token->setAuthenticated(false); $this->assertFalse($token->isAuthenticated()); }