diff --git a/composer.json b/composer.json index e937714f..a130a078 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ "php": ">=5.3.0" }, "require-dev": { - "phpunit/phpunit": "~4", + "phpunit/phpunit": "~4 | ~5", "doctrine/orm": "~2.3", "mandango/mandango": "~1.0@dev", "mandango/mondator": "~1.0@dev", diff --git a/tests/Pagerfanta/Tests/Adapter/DoctrineSelectableAdapterTest.php b/tests/Pagerfanta/Tests/Adapter/DoctrineSelectableAdapterTest.php index c2347fa6..343429a2 100644 --- a/tests/Pagerfanta/Tests/Adapter/DoctrineSelectableAdapterTest.php +++ b/tests/Pagerfanta/Tests/Adapter/DoctrineSelectableAdapterTest.php @@ -36,7 +36,7 @@ private function isDoctrine23OrGreaterNotAvailable() private function createSelectableMock() { - return $this->getMock('Doctrine\Common\Collections\Selectable'); + return $this->getMockBuilder('Doctrine\Common\Collections\Selectable')->getMock(); } private function createCriteria() @@ -71,7 +71,7 @@ public function testGetNbResults() private function createCollectionMock() { - return $this->getMock('Doctrine\Common\Collections\Collection'); + return $this->getMockBuilder('Doctrine\Common\Collections\Collection')->getMock(); } public function testGetSlice() diff --git a/tests/Pagerfanta/Tests/Adapter/SolariumAdapterTest.php b/tests/Pagerfanta/Tests/Adapter/SolariumAdapterTest.php index 66bf6133..3d4f0514 100644 --- a/tests/Pagerfanta/Tests/Adapter/SolariumAdapterTest.php +++ b/tests/Pagerfanta/Tests/Adapter/SolariumAdapterTest.php @@ -214,7 +214,7 @@ private function createClientMock() private function createQueryMock() { - return $this->getMock($this->getQueryClass()); + return $this->getMockBuilder($this->getQueryClass())->getMock(); } private function createQueryStub() diff --git a/tests/Pagerfanta/Tests/PagerfantaTest.php b/tests/Pagerfanta/Tests/PagerfantaTest.php index 1c136f99..38ecc3e1 100644 --- a/tests/Pagerfanta/Tests/PagerfantaTest.php +++ b/tests/Pagerfanta/Tests/PagerfantaTest.php @@ -29,7 +29,7 @@ class PagerfantaTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->adapter = $this->getMock('Pagerfanta\Adapter\AdapterInterface'); + $this->adapter = $this->getMockBuilder('Pagerfanta\Adapter\AdapterInterface')->getMock(); $this->pagerfanta = new Pagerfanta($this->adapter); } diff --git a/tests/Pagerfanta/Tests/View/OptionableViewTest.php b/tests/Pagerfanta/Tests/View/OptionableViewTest.php index 797dd7bf..cb7f175d 100644 --- a/tests/Pagerfanta/Tests/View/OptionableViewTest.php +++ b/tests/Pagerfanta/Tests/View/OptionableViewTest.php @@ -18,7 +18,7 @@ protected function setUp() private function createPagerfantaMock() { - return $this->getMock('Pagerfanta\PagerfantaInterface'); + return $this->getMockBuilder('Pagerfanta\PagerfantaInterface')->getMock(); } private function createRouteGenerator() @@ -52,7 +52,7 @@ public function testRenderShouldMergeOptions() private function createViewMock($expectedOptions) { - $view = $this->getMock('Pagerfanta\View\ViewInterface'); + $view = $this->getMockBuilder('Pagerfanta\View\ViewInterface')->getMock(); $view ->expects($this->once()) ->method('render') diff --git a/tests/Pagerfanta/Tests/View/ViewFactoryTest.php b/tests/Pagerfanta/Tests/View/ViewFactoryTest.php index 630d3547..72887fb6 100644 --- a/tests/Pagerfanta/Tests/View/ViewFactoryTest.php +++ b/tests/Pagerfanta/Tests/View/ViewFactoryTest.php @@ -8,10 +8,10 @@ class ViewFactoryTest extends \PHPUnit_Framework_TestCase { public function testFactory() { - $view1 = $this->getMock('Pagerfanta\View\ViewInterface'); - $view2 = $this->getMock('Pagerfanta\View\ViewInterface'); - $view3 = $this->getMock('Pagerfanta\View\ViewInterface'); - $view4 = $this->getMock('Pagerfanta\View\ViewInterface'); + $view1 = $this->getMockBuilder('Pagerfanta\View\ViewInterface')->getMock(); + $view2 = $this->getMockBuilder('Pagerfanta\View\ViewInterface')->getMock(); + $view3 = $this->getMockBuilder('Pagerfanta\View\ViewInterface')->getMock(); + $view4 = $this->getMockBuilder('Pagerfanta\View\ViewInterface')->getMock(); $factory = new ViewFactory(); diff --git a/tests/Pagerfanta/Tests/View/ViewTestCase.php b/tests/Pagerfanta/Tests/View/ViewTestCase.php index 30aee6d5..358da50e 100644 --- a/tests/Pagerfanta/Tests/View/ViewTestCase.php +++ b/tests/Pagerfanta/Tests/View/ViewTestCase.php @@ -26,7 +26,7 @@ protected function setUp() private function createAdapterMock() { - return $this->getMock('Pagerfanta\Adapter\AdapterInterface'); + return $this->getMockBuilder('Pagerfanta\Adapter\AdapterInterface')->getMock(); } /**