8000 [RateLimiter] Fix delete method of the cache storage by GregOriol · Pull Request #38661 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[RateLimiter] Fix delete method of the cache storage #38661

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

Merged
merged 3 commits into from
Oct 22, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
minor
  • Loading branch information
Nyholm committed Oct 22, 2020
commit b61d9d1ea3a489346bad2e1b301574a4d2f40323
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,6 @@ public function testDelete()
{
$this->pool->expects($this->once())->method('deleteItem')->with(sha1('test'))->willReturn(true);
Copy link
Member
@Nyholm Nyholm Oct 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line uses $this->pool which is a mock created in setUp().

We say that we "expect" that "once" the "method deleteItem" is called with sha1('test'). We also return true.

If what we expect does not happen, then the test will fail


$this->assertNull($this->storage->delete('test'));
$this->storage->delete('test');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just calling the storage

}
}
0