@@ -219,19 +219,22 @@ public function testGet()
219
219
public function testRemove ()
220
220
{
221
221
$ collection = new RouteCollection ();
222
- $ collection ->add ('foo ' , $ foo = new Route ('/foo ' ));
222
+ $ collection ->add ('foo ' , new Route ('/foo ' ));
223
223
224
224
$ collection1 = new RouteCollection ();
225
225
$ collection1 ->add ('bar ' , $ bar = new Route ('/bar ' ));
226
226
$ collection ->addCollection ($ collection1 );
227
227
$ collection ->add ('last ' , $ last = new Route ('/last ' ));
228
- $ collection ->addAlias ('ccc_my_custom_alias ' , 'foo ' );
228
+ $ collection ->addAlias ('alias_removed_when_removing_route_foo ' , 'foo ' );
229
+ $ collection ->addAlias ('alias_directly_removed ' , 'bar ' );
229
230
230
231
$ collection ->remove ('foo ' );
231
232
$ this ->assertSame (['bar ' => $ bar , 'last ' => $ last ], $ collection ->all (), '->remove() can remove a single route ' );
233
+ $ collection ->remove ('alias_directly_removed ' );
234
+ $ this ->assertNull ($ collection ->getAlias ('alias_directly_removed ' ));
232
235
$ collection ->remove (['bar ' , 'last ' ]);
233
236
$ this ->assertSame ([], $ collection ->all (), '->remove() accepts an array and can remove multiple routes at once ' );
234
- $ this ->assertNull ($ collection ->getAlias ('ccc_my_custom_alias ' ));
237
+ $ this ->assertNull ($ collection ->getAlias ('alias_removed_when_removing_route_foo ' ));
235
238
}
236
239
237
240
public function testSetHost ()
0 commit comments