コード例 #1
0
ファイル: TokenTest.php プロジェクト: rsky/symfony
 /**
  * @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());
 }
コード例 #2
0
ファイル: TokenTest.php プロジェクト: notbrain/symfony
 /**
  * @expectedException \LogicException
  * @dataProvider getImmutabilityTests
  */
 public function testImmutabilityIsEnforced($setter, $value)
 {
     $token = new Token();
     $token->setImmutable(true);
     $token->{$setter}($value);
 }