1 | <?php |
||
23 | class CollectionTest extends \Mockery\Adapter\Phpunit\MockeryTestCase |
||
24 | { |
||
25 | /** @var MockInterface|Queue */ |
||
26 | protected $routers; |
||
27 | |||
28 | /** @var MockInterface|Xsl */ |
||
29 | protected $writer; |
||
30 | |||
31 | /** @var Collection */ |
||
32 | protected $fixture; |
||
33 | |||
34 | /** |
||
35 | * Initializes the fixture and dependencies for this testcase. |
||
36 | */ |
||
37 | protected function setUp() |
||
43 | |||
44 | /** |
||
45 | * @covers phpDocumentor\Transformer\Writer\Collection::__construct |
||
46 | */ |
||
47 | public function testIfDependenciesAreCorrectlyRegisteredOnInitialization() |
||
51 | |||
52 | /** |
||
53 | * @expectedException \InvalidArgumentException |
||
54 | * @covers phpDocumentor\Transformer\Writer\Collection::offsetSet |
||
55 | */ |
||
56 | public function testOffsetSetWithWriterNotDescendingFromWriterAbstract() |
||
60 | |||
61 | /** |
||
62 | * @expectedException \InvalidArgumentException |
||
63 | * @covers phpDocumentor\Transformer\Writer\Collection::offsetSet |
||
64 | */ |
||
65 | public function testOffsetSetWithInvalidIndexName() |
||
69 | |||
70 | /** |
||
71 | * @covers phpDocumentor\Transformer\Writer\Collection::offsetSet |
||
72 | */ |
||
73 | public function testOffsetSetWriterReceivesRouterQueue() |
||
80 | |||
81 | /** |
||
82 | * @expectedException \InvalidArgumentException |
||
83 | * @covers phpDocumentor\Transformer\Writer\Collection::offsetGet |
||
84 | */ |
||
85 | public function testOffsetGetWithNonExistingIndex() |
||
89 | |||
90 | /** |
||
91 | * @covers phpDocumentor\Transformer\Writer\Collection::offsetGet |
||
92 | */ |
||
93 | public function testOffsetGetWithExistingIndex() |
||
99 | |||
100 | /** |
||
101 | * @covers phpDocumentor\Transformer\Writer\Collection::checkRequirements |
||
102 | */ |
||
103 | public function testCheckRequirements() |
||
112 | |||
113 | /** |
||
114 | * Registers a writer for tests that need a collection item |
||
115 | */ |
||
116 | private function registerWriter() |
||
121 | } |
||
122 |
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: