@@ -35,11 +35,6 @@ public function testRendering()
3535 'url ' => '/organisation/71/owner/ ' ,
3636 'response ' => $ this ->readFixture ("GET_owner_23.json " )
3737 ],
38- [
39- 'function ' => 'readGetResult ' ,
40- 'url ' => '/warehouse/slotscope/ ' ,
41- 'response ' => $ this ->readFixture ("GET_warehouse_slotscope.json " )
42- ],
4338 [
4439 'function ' => 'readGetResult ' ,
4540 'url ' => '/warehouse/slotscope/141/ ' ,
@@ -50,12 +45,18 @@ public function testRendering()
5045 'url ' => '/warehouse/slotscope/141/_/ ' ,
5146 'response ' => $ this ->readFixture ("GET_slotscope_141_report.json " )
5247 ],
48+ [
49+ 'function ' => 'readGetResult ' ,
50+ 'url ' => '/warehouse/slotscope/ ' ,
51+ 'response ' => $ this ->readFixture ("GET_warehouse_slotscope.json " )
52+ ],
5353 ]
5454 );
5555 $ response = $ this ->render ([], ['__uri ' => '/report/capacity/scope/ ' ], []);
5656 $ this ->assertStringContainsString ('Terminkapazität Standort ' , (string ) $ response ->getBody ());
5757 $ this ->assertStringContainsString ('data-scope-date-bounds ' , (string ) $ response ->getBody ());
58- $ this ->assertStringContainsString ('"141":{"min":"2016-03-15","max":"2016-04-02"} ' , (string ) $ response ->getBody ());
58+ $ this ->assertStringContainsString ('2016-03-15 ' , (string ) $ response ->getBody ());
59+ $ this ->assertStringContainsString ('2016-04-02 ' , (string ) $ response ->getBody ());
5960 $ this ->assertStringContainsString (
6061 '<a href="/report/capacity/scope/2016-04/">April</a> ' ,
6162 (string ) $ response ->getBody ()
@@ -92,11 +93,6 @@ public function testWithPeriod()
9293 'url ' => '/organisation/71/owner/ ' ,
9394 'response ' => $ this ->readFixture ("GET_owner_23.json " )
9495 ],
95- [
96- 'function ' => 'readGetResult ' ,
97- 'url ' => '/warehouse/slotscope/ ' ,
98- 'response ' => $ this ->readFixture ("GET_warehouse_slotscope.json " )
99- ],
10096 [
10197 'function ' => 'readGetResult ' ,
10298 'url ' => '/warehouse/slotscope/141/ ' ,
@@ -109,7 +105,12 @@ public function testWithPeriod()
109105 ],
110106 [
111107 'function ' => 'readGetResult ' ,
112- 'url ' => '/warehouse/slotscope/141/_/ ' ,
108+ 'url ' => '/warehouse/slotscope/ ' ,
109+ 'response ' => $ this ->readFixture ("GET_warehouse_slotscope.json " )
110+ ],
111+ [
112+ 'function ' => 'readGetResult ' ,
113+ 'url ' => '/warehouse/slotscope/141/2016-04/ ' ,
113114 'response ' => $ this ->readFixture ("GET_slotscope_141_report.json " )
114115 ],
115116 ]
@@ -147,11 +148,6 @@ public function testWithMultipleScopes()
147148 'url ' => '/organisation/71/owner/ ' ,
148149 'response ' => $ this ->readFixture ("GET_owner_23.json " )
149150 ],
150- [
151- 'function ' => 'readGetResult ' ,
152- 'url ' => '/warehouse/slotscope/ ' ,
153- 'response ' => $ this ->readFixture ("GET_warehouse_slotscope.json " )
154- ],
155151 [
156152 'function ' => 'readGetResult ' ,
157153 'url ' => '/warehouse/slotscope/141/ ' ,
@@ -164,15 +160,23 @@ public function testWithMultipleScopes()
164160 ],
165161 [
166162 'function ' => 'readGetResult ' ,
167- 'url ' => '/warehouse/slotscope/141,142/_/ ' ,
163+ 'url ' => '/warehouse/slotscope/ ' ,
164+ 'response ' => $ this ->readFixture ("GET_warehouse_slotscope.json " )
165+ ],
166+ [
167+ 'function ' => 'readGetResult ' ,
168+ 'url ' => '/warehouse/slotscope/141,142/2016-04/ ' ,
168169 'response ' => $ this ->readFixture ("GET_slotscope_141_report.json " )
169170 ],
170171 ]
171172 );
172173 $ response = $ this ->render (
173174 ['period ' => '2016-04 ' ],
174- [],
175- ['scopes ' => ['141 ' , '142 ' ]]
175+ [
176+ '__uri ' => '/report/capacity/scope/2016-04/ ' ,
177+ 'scopes ' => ['141 ' , '142 ' ],
178+ ],
179+ []
176180 );
177181 $ this ->assertStringContainsString ('01.04.2016 ' , (string ) $ response ->getBody ());
178182 }
@@ -202,11 +206,6 @@ public function testHourlyDateRange()
202206 'url ' => '/organisation/71/owner/ ' ,
203207 'response ' => $ this ->readFixture ("GET_owner_23.json " )
204208 ],
205- [
206- 'function ' => 'readGetResult ' ,
207- 'url ' => '/warehouse/slotscope/ ' ,
208- 'response ' => $ this ->readFixture ("GET_warehouse_slotscope.json " )
209- ],
210209 [
211210 'function ' => 'readGetResult ' ,
212211 'url ' => '/warehouse/slotscope/141/ ' ,
@@ -217,6 +216,11 @@ public function testHourlyDateRange()
217216 'url ' => '/warehouse/slotscope/141/_/ ' ,
218217 'response ' => $ this ->readFixture ("GET_slotscope_141_report.json " )
219218 ],
219+ [
220+ 'function ' => 'readGetResult ' ,
221+ 'url ' => '/warehouse/slotscope/ ' ,
222+ 'response ' => $ this ->readFixture ("GET_warehouse_slotscope.json " )
223+ ],
220224 [
221225 'function ' => 'readGetResult ' ,
222226 'url ' => '/warehouse/slotscope/141/2016-04-01/ ' ,
@@ -231,14 +235,18 @@ public function testHourlyDateRange()
231235 );
232236 $ response = $ this ->render (
233237 [],
234- ['__uri ' => '/report/capacity/scope/ ' ],
235- ['from ' => '2016-04-01 ' , 'to ' => '2016-04-01 ' ]
238+ [
239+ '__uri ' => '/report/capacity/scope/ ' ,
240+ 'from ' => '2016-04-01 ' ,
241+ 'to ' => '2016-04-01 ' ,
242+ ],
243+ []
236244 );
237245 $ body = (string ) $ response ->getBody ();
238246 $ this ->assertStringContainsString ('Zeitpunkt ' , $ body );
239247 $ this ->assertStringContainsString ('2016-04-01 08:00 ' , $ body );
240248 $ this ->assertStringContainsString ('2016-04-01 09:00 ' , $ body );
241- $ this ->assertStringContainsString ('["141","2016-04-01 08:00",5,10] ' , $ body );
242- $ this ->assertStringContainsString ('["141","2016-04-01 07:00",0,0] ' , $ body );
249+ $ this ->assertStringContainsString ('data-chartist ' , $ body );
250+ $ this ->assertStringContainsString ('50 % ' , $ body );
243251 }
244252}
0 commit comments