8000 minor #42903 [HttpKernel] Fix broken mock (derrabus) · symfony/symfony@dd45efc · GitHub
[go: up one dir, main page]

Skip to content

Commit dd45efc

Browse files
committed
minor #42903 [HttpKernel] Fix broken mock (derrabus)
This PR was merged into the 4.4 branch. Discussion ---------- [HttpKernel] Fix broken mock | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | N/A | License | MIT | Doc PR | N/A This PR fixes a test that fails on the 6.0 branch because of a broken mock: A correct implementation of `CacheItemPoolInterface::clear()` returns a `bool`, but this mock currently returns `null`. Commits ------- 1ab97ea [HttpKernel] Fix broken mock
2 parents 2ed7672 + 1ab97ea commit dd45efc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Symfony/Component/HttpKernel/Tests/CacheClearer/Psr6CacheClearerTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,11 @@ public function testClearPool()
3232
$pool = $this->createMock(CacheItemPoolInterface::class);
3333
$pool
3434
->expects($this->once())
35-
->method('clear');
35+
->method('clear')
36+
->willReturn(true)
37+
;
3638

37-
(new Psr6CacheClearer(['pool' => $pool]))->clearPool('pool');
39+
$this->assertTrue((new Psr6CacheClearer(['pool' => $pool]))->clearPool('pool'));
3840
}
3941

4042
public function testClearPoolThrowsExceptionOnUnreferencedPool()

0 commit comments

Comments
 (0)
0