Conditions | 1 |
Paths | 1 |
Total Lines | 24 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
20 | public function testAddonToJson() |
||
21 | { |
||
22 | $s = new StitchDataSender(); |
||
23 | $result = ($s->addonToJson($this->objFromFixture('Addon', 'addon_a'))); |
||
|
|||
24 | |||
25 | |||
26 | $this->assertEquals('sminnee/test-package', $result['Name']); |
||
27 | $this->assertInstanceof('Datetime', $result['Released']); |
||
28 | $this->assertEquals([ 'Name' => 'good_code_coverage', 'Value' => 0 ], $result['RatingDetails'][0]); |
||
29 | $this->assertEquals(2, sizeof($result['Versions'])); |
||
30 | $this->assertEquals('1.4.2.0', $result['Versions'][0]['Version']); |
||
31 | $this->assertEquals( |
||
32 | [[ 'Version' => '3.6', 'Major' => 3, 'Minor' => 6 ]], |
||
33 | $result['Versions'][0]['CompatibleVersions'] |
||
34 | ); |
||
35 | $this->assertEquals( |
||
36 | [[ |
||
37 | 'Name' => 'Uncle Cheese', |
||
38 | 'Email' => '[email protected]', |
||
39 | 'Homepage' => 'http://leftandmain.com', |
||
40 | ]], |
||
41 | $result['Versions'][0]['Authors'] |
||
42 | ); |
||
43 | } |
||
44 | } |
||
45 |
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: