Sanpi\Behatch\Context\RestContext::theResponseShouldExpireInTheFuture PHP Method

theResponseShouldExpireInTheFuture() public method

Checks, that the response header expire is in the future
    public function theResponseShouldExpireInTheFuture()
    {
        $date = new \DateTime($this->request->getHttpHeader('Date'));
        $expires = new \DateTime($this->request->getHttpHeader('Expires'));
        $this->assertSame(1, $expires->diff($date)->invert, sprintf('The response doesn\'t expire in the future (%s)', $expires->format(DATE_ATOM)));
    }