1 | <?php |
||
22 | final class UriTest extends TestCase |
||
23 | { |
||
24 | /** |
||
25 | * @covers ::__construct |
||
26 | * @covers ::__toString |
||
27 | * @covers ::<private> |
||
28 | */ |
||
29 | public function testItShouldReturnTheUriAsAString() |
||
35 | |||
36 | /** |
||
37 | * @covers ::<private> |
||
38 | * @expectedException \InvalidArgumentException |
||
39 | * @expectedExceptionMessage http://foo,bar is not a valid uri |
||
40 | */ |
||
41 | public function testItShouldDiscardAnInvalidUri() |
||
45 | |||
46 | /** |
||
47 | * @covers ::<private> |
||
48 | */ |
||
49 | public function testItShouldAddAFileSchemeWhenSchemeIsAbsent() |
||
55 | |||
56 | /** |
||
57 | * @covers ::<private> |
||
58 | */ |
||
59 | public function testItShouldAddAFileSchemeWhenAWindowsDriveLetterIsGiven() |
||
65 | |||
66 | public function testItShouldReturnTrueIfUrisAreEqual() |
||
73 | |||
74 | public function testItShouldReturnTrueIfUrisAreNotEqual() |
||
81 | } |
||
82 |
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: