Exemplo n.º 1
0
 /**
  * {@inheritDoc}
  *
  * @param Identificator $details
  *
  * @throws InvalidArgumentException if $details is not instance of Identificator
  *
  * @return void
  */
 public function setDetails($details)
 {
     if (false == $details instanceof Identificator) {
         throw new InvalidArgumentException('Details must be instance of `Identificator`.');
     }
     parent::setDetails($details);
 }
Exemplo n.º 2
0
 /**
  * @test
  */
 public function shouldAllowGetIdentificatorPreviouslySetAsDetails()
 {
     $expectedIdentificator = new Identificator('anId', 'stdClass');
     $token = new Token();
     $token->setDetails($expectedIdentificator);
     $this->assertSame($expectedIdentificator, $token->getDetails());
 }