1 | <?php |
||
32 | class SatisfiesIntroductionInterfaceTest extends \PHPUnit_Framework_TestCase |
||
33 | { |
||
34 | /** |
||
35 | * @return array |
||
36 | */ |
||
37 | public function fixtureProvider() |
||
52 | |||
53 | /** |
||
54 | * @return array |
||
55 | */ |
||
56 | public function classNameProvider() |
||
66 | |||
67 | /** |
||
68 | * @dataProvider classNAmeProvider |
||
69 | * @param Introduction $fixture |
||
70 | */ |
||
71 | public function testImplementsIntroductionInterface($fixture) |
||
82 | |||
83 | /** |
||
84 | * @dataProvider fixtureProvider |
||
85 | * @param Introduction $fixture |
||
86 | */ |
||
87 | public function testIntroductionIsNullToStart($fixture) |
||
93 | |||
94 | /** |
||
95 | * @dataProvider fixtureProvider |
||
96 | * @param Introduction $fixture |
||
97 | */ |
||
98 | public function testCanSetIntroduction($fixture) |
||
106 | |||
107 | /** |
||
108 | * @dataProvider fixtureProvider |
||
109 | * @param Introduction $fixture |
||
110 | */ |
||
111 | public function testSetIntroductionReturnsSelf($fixture) |
||
118 | |||
119 | /** |
||
120 | * @dataProvider fixtureProvider |
||
121 | * @param Introduction $fixture |
||
122 | */ |
||
123 | public function testIntroductionIsTypeCastToString($fixture) |
||
131 | |||
132 | /** |
||
133 | * @dataProvider fixtureProvider |
||
134 | * @param Introduction $fixture |
||
135 | */ |
||
136 | public function testIntroductionCanBeSetToNull($fixture) |
||
144 | |||
145 | /** |
||
146 | * @dataProvider fixtureProvider |
||
147 | * @expectedException InvalidArgumentException |
||
148 | * @param Introduction $fixture |
||
149 | */ |
||
150 | public function testSetIntroductionThrowsExceptionIfArgumentIsNotScalar($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: