-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
HttpCache: New test for revalidating responses with an expired TTL #22099
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
sleep(15); // expire the cache | ||
|
||
$this->setNextResponse(304, array(), '', function (Request $request, Response $response) use ($time) { | ||
$this->assertEquals($time->format(DATE_RFC2822), $request->headers->get('IF_MODIFIED_SINCE')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That does not work on PHP 5.3. You should create a$that
var outside and pass it via use
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I always wonder whether you know this off by heart, or if the failing tests remind you of it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we all do the same mistake, so I don't need the test to fail to spot this kind of errors :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. Somehow I know this is will happen to me again. 🤔
Thank you @mpdude. |
…xpired TTL (mpdude) This PR was squashed before being merged into the 2.7 branch (closes #22099). Discussion ---------- HttpCache: New test for revalidating responses with an expired TTL | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | See #22035, in particular [this and the following comments](#22035 (comment)). Commits ------- 067ab52 HttpCache: New test for revalidating responses with an expired TTL
See #22035, in particular this and the following comments.