Exemple #1
0
 /**
  * @covers Symfony\Component\Security\Authentication\Token\Token::isImmutable
  * @covers Symfony\Component\Security\Authentication\Token\Token::setImmutable
  */
 public function testImmutableFlag()
 {
     $token = new Token();
     $this->assertFalse($token->isImmutable());
     $token->setImmutable(true);
     $this->assertTrue($token->isImmutable());
     $token->setImmutable(false);
     $this->assertFalse($token->isImmutable());
 }
Exemple #2
0
 /**
  * @expectedException \LogicException
  * @dataProvider getImmutabilityTests
  */
 public function testImmutabilityIsEnforced($setter, $value)
 {
     $token = new Token();
     $token->setImmutable(true);
     $token->{$setter}($value);
 }