Emarref\Jwt\Verification\NotBeforeVerifierTest::testValid PHP Method

testValid() public method

public testValid ( )
    public function testValid()
    {
        $past = new \DateTime('5 minutes ago', new \DateTimeZone('UTC'));
        $notBeforeClaim = $this->getMockBuilder('Emarref\\Jwt\\Claim\\NotBefore')->getMock();
        $notBeforeClaim->expects($this->exactly(2))->method('getValue')->will($this->returnValue($past->getTimestamp()));
        $this->payload->expects($this->once())->method('findClaimByName')->with(NotBefore::NAME)->will($this->returnValue($notBeforeClaim));
        $this->verifier->verify($this->token);
    }