1 | <?php |
||
47 | class RouteTest extends AbstractServerTest |
||
48 | { |
||
49 | /** |
||
50 | * Test empty route verbs |
||
51 | * |
||
52 | * @expectedException \Apparat\Server\Ports\Route\InvalidArgumentException |
||
53 | * @expectedExceptionCode 1464520768 |
||
54 | */ |
||
55 | public function testEmptyRouteVerbs() |
||
59 | |||
60 | /** |
||
61 | * Test invalid route verb |
||
62 | * |
||
63 | * @expectedException \Apparat\Server\Ports\Route\InvalidArgumentException |
||
64 | * @expectedExceptionCode 1464520896 |
||
65 | */ |
||
66 | public function testInvalidRouteVerb() |
||
70 | |||
71 | /** |
||
72 | * Test empty route name |
||
73 | * |
||
74 | * @expectedException \Apparat\Server\Ports\Route\InvalidArgumentException |
||
75 | * @expectedExceptionCode 1464521013 |
||
76 | */ |
||
77 | public function testEmptyRouteName() |
||
81 | |||
82 | /** |
||
83 | * Test empty route path |
||
84 | * |
||
85 | * @expectedException \Apparat\Server\Ports\Route\InvalidArgumentException |
||
86 | * @expectedExceptionCode 1464521073 |
||
87 | */ |
||
88 | public function testEmptyRoutePath() |
||
92 | |||
93 | /** |
||
94 | * Test empty route action |
||
95 | * |
||
96 | * @expectedException \Apparat\Server\Ports\Route\InvalidArgumentException |
||
97 | * @expectedExceptionCode 1464521136 |
||
98 | */ |
||
99 | public function testEmptyRouteAction() |
||
103 | |||
104 | /** |
||
105 | * Test invalid route action class |
||
106 | * |
||
107 | * @expectedException \Apparat\Server\Ports\Route\InvalidArgumentException |
||
108 | * @expectedExceptionCode 1464521937 |
||
109 | */ |
||
110 | public function testInvalidRouteActionClass() |
||
114 | |||
115 | /** |
||
116 | * Test invalid route action interface |
||
117 | * |
||
118 | * @expectedException \Apparat\Server\Ports\Route\InvalidArgumentException |
||
119 | * @expectedExceptionCode 1464522202 |
||
120 | */ |
||
121 | public function testInvalidRouteActionInterface() |
||
125 | |||
126 | /** |
||
127 | * Test invalid route action |
||
128 | * |
||
129 | * @expectedException \Apparat\Server\Ports\Route\InvalidArgumentException |
||
130 | * @expectedExceptionCode 1464521506 |
||
131 | */ |
||
132 | public function testInvalidRouteAction() |
||
136 | |||
137 | /** |
||
138 | * Test the route setters |
||
139 | */ |
||
140 | public function testRouteSetters() |
||
159 | } |
||
160 |
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: