Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Closed
wants to merge 4 commits into from
Closed

HttpCache: New test for revalidating responses with an expired TTL #22099

wants to merge 4 commits into from

Conversation

mpdude
Copy link
Contributor

@mpdude mpdude commented Mar 21, 2017

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.

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'));
Copy link
Member

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

Copy link
Contributor Author

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?

Copy link
Member

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 :)

Copy link
Contributor Author

@mpdude mpdude Mar 21, 2017

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. 🤔

@fabpot
Copy link
Member

fabpot commented Mar 21, 2017

Thank you @mpdude.

fabpot added a commit that referenced this pull request Mar 21, 2017
…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
@fabpot fabpot closed this Mar 21, 2017
@mpdude mpdude deleted the new-test-http-revalidate-27 branch March 21, 2017 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants