1 | <?php |
||
9 | abstract class ViewTestCase extends TestCase |
||
10 | { |
||
11 | private $adapter; |
||
12 | /** |
||
13 | * @var Pagerfanta |
||
14 | */ |
||
15 | private $pagerfanta; |
||
16 | /** |
||
17 | * @var ViewInterface |
||
18 | */ |
||
19 | private $view; |
||
20 | |||
21 | protected function setUp() |
||
22 | { |
||
23 | $this->adapter = $this->createAdapterMock(); |
||
24 | $this->pagerfanta = new Pagerfanta($this->adapter); |
||
|
|||
25 | $this->view = $this->createView(); |
||
26 | } |
||
27 | |||
28 | private function createAdapterMock() |
||
29 | { |
||
30 | return $this->getMockBuilder('Pagerfanta\Adapter\AdapterInterface')->getMock(); |
||
31 | } |
||
32 | |||
33 | /** |
||
34 | * @return ViewInterface |
||
35 | */ |
||
36 | abstract protected function createView(); |
||
37 | |||
38 | protected function setNbPages($nbPages) |
||
39 | { |
||
47 | |||
48 | private function calculateNbResults($nbPages) |
||
52 | |||
53 | protected function setCurrentPage($currentPage) |
||
57 | |||
58 | protected function renderView($options) |
||
64 | |||
65 | protected function createRouteGenerator() |
||
69 | |||
70 | protected function assertRenderedView($expected, $result) |
||
74 | |||
75 | protected function filterExpectedView($expected) |
||
79 | |||
80 | protected function removeWhitespacesBetweenTags($string) |
||
84 | } |
||
85 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: