verify() public method

public verify ( Token $token )
$token Emarref\Jwt\Token
Esempio n. 1
0
 public function testSuccess()
 {
     $issuerClaim = $this->getMockBuilder('Emarref\\Jwt\\Claim\\Issuer')->getMock();
     $issuerClaim->expects($this->once())->method('getValue')->will($this->returnValue('an_issuer'));
     $this->token->expects($this->once())->method('getPayload')->will($this->returnValue($this->payload));
     $this->payload->expects($this->once())->method('findClaimByName')->with(Claim\Issuer::NAME)->will($this->returnValue($issuerClaim));
     $verifier = new IssuerVerifier('an_issuer');
     $verifier->verify($this->token);
 }