Skip to content

Commit

Permalink
Don't use PHPUnit's deprecated getMock method
Browse files Browse the repository at this point in the history
  • Loading branch information
psrpinto committed Jul 23, 2016
1 parent 0c1135d commit 71b9590
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions Tests/EventListener/InjectLiveReloadListenerTest.php
Expand Up @@ -90,11 +90,11 @@ public function testInjectScript()

protected function getRequestMock($isXmlHttpRequest = false)
{
$request = $this->getMock(
'Symfony\Component\HttpFoundation\Request',
array('isXmlHttpRequest'),
array(), '', false
);
$request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')
->disableOriginalConstructor()
->setMethods(array('isXmlHttpRequest'))
->getMock()
;

$request->expects($this->any())
->method('isXmlHttpRequest')
Expand All @@ -105,6 +105,9 @@ protected function getRequestMock($isXmlHttpRequest = false)

protected function getKernelMock()
{
return $this->getMock('Symfony\Component\HttpKernel\Kernel', array(), array(), '', false);
return $this->getMockBuilder('Symfony\Component\HttpKernel\Kernel')
->disableOriginalConstructor()
->getMock()
;
}
}

0 comments on commit 71b9590

Please sign in to comment.