We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2cbf9b4 commit 38bcf19Copy full SHA for 38bcf19
tests/Unit/EventListener/CacheControlListenerTest.php
@@ -402,14 +402,12 @@ public function testMatchRule()
402
*/
403
public function testUnsafeMethod()
404
{
405
- /** @var CacheControlListener|\PHPUnit_Framework_MockObject_MockObject $listener */
406
- $listener = $this->getMockBuilder(CacheControlListener::class)
407
- ->setMethods(['matchRule'])
408
- ->getMock()
409
- ;
410
- $listener->expects($this->never())
411
- ->method('matchRule')
412
+ $listener = new CacheControlListener();
+ $matcher = \Mockery::mock(RuleMatcherInterface::class)
+ ->shouldReceive('matches')->never()
+ ->getMock();
+ $listener->addRule($matcher);
+
413
$event = $this->buildEvent('POST');
414
415
$listener->onKernelResponse($event);
0 commit comments