1 | <?php |
||
32 | class SatisfiesCopyInterfaceTest extends \PHPUnit_Framework_TestCase |
||
33 | { |
||
34 | public function fixtureProvider() |
||
53 | |||
54 | public function classNameProvider() |
||
67 | |||
68 | /** |
||
69 | * @dataProvider classNameProvider |
||
70 | * @param Copy $fixture |
||
71 | */ |
||
72 | public function testImplementsCopyInterface($fixture) |
||
83 | |||
84 | /** |
||
85 | * @dataProvider fixtureProvider |
||
86 | * @param Copy $fixture |
||
87 | */ |
||
88 | public function testCopyIsNullToStart($fixture) |
||
94 | /** |
||
95 | * @dataProvider fixtureProvider |
||
96 | * @param Copy $fixture |
||
97 | */ |
||
98 | public function testCanSetCopy($fixture) |
||
106 | |||
107 | /** |
||
108 | * @dataProvider fixtureProvider |
||
109 | * @param Copy $fixture |
||
110 | */ |
||
111 | public function testSetCopyReturnsSelf($fixture) |
||
118 | |||
119 | /** |
||
120 | * @dataProvider fixtureProvider |
||
121 | * @param Copy $fixture |
||
122 | */ |
||
123 | public function testCopyIsTypeCastToString($fixture) |
||
131 | |||
132 | /** |
||
133 | * @dataProvider fixtureProvider |
||
134 | * @param Copy $fixture |
||
135 | */ |
||
136 | public function testCopyCanBeSetToNull($fixture) |
||
144 | |||
145 | /** |
||
146 | * @expectedException InvalidArgumentException |
||
147 | * @dataProvider fixtureProvider |
||
148 | * @param Copy $fixture |
||
149 | */ |
||
150 | public function testSetCopyThrowsExceptionIfArgumentIsNotScalar($fixture) |
||
154 | } |
||
155 |
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: