1 | <?php |
||
26 | class ExtendedJsonLdEntityFormatterTest extends JsonLdFormatterTestBase { |
||
27 | |||
28 | /** |
||
29 | * @see JsonLdFormatterTestBase::validProvider |
||
30 | */ |
||
31 | public function validProvider() { |
||
53 | |||
54 | /** |
||
55 | * @see JsonLdFormatterTestBase::getInstance |
||
56 | */ |
||
57 | protected function getInstance(FormatterOptions $options = null) { |
||
58 | $snakFormatterMock = $this->getMock('ValueFormatters\ValueFormatter'); |
||
59 | $snakFormatterMock->expects($this->any()) |
||
60 | ->method('format') |
||
61 | ->with($this->equalTo(new PropertyValueSnak(new PropertyId('P21'), new EntityIdValue(new ItemId('Q1'))))) |
||
62 | ->willReturn(array( |
||
63 | 'gender' => (object) array('name' => 'foo') |
||
64 | )); |
||
65 | |||
66 | return new ExtendedJsonLdEntityFormatter( |
||
67 | new JsonLdEntityFormatter($options), |
||
|
|||
68 | $snakFormatterMock, |
||
69 | $options |
||
70 | ); |
||
71 | } |
||
72 | |||
73 | private function getQ42() { |
||
87 | } |
||
88 |
It seems like you allow that null is being passed for a parameter, however the function which is called does not seem to accept null.
We recommend to add an additional type check (or disallow null for the parameter):