@@ -219,19 +219,22 @@ public function testGet()
219219 public function testRemove ()
220220 {
221221 $ collection = new RouteCollection ();
222- $ collection ->add ('foo ' , $ foo = new Route ('/foo ' ));
222+ $ collection ->add ('foo ' , new Route ('/foo ' ));
223223
224224 $ collection1 = new RouteCollection ();
225225 $ collection1 ->add ('bar ' , $ bar = new Route ('/bar ' ));
226226 $ collection ->addCollection ($ collection1 );
227227 $ 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 ' );
229230
230231 $ collection ->remove ('foo ' );
231232 $ 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 ' ));
232235 $ collection ->remove (['bar ' , 'last ' ]);
233236 $ 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 ' ));
235238 }
236239
237240 public function testSetHost ()
0 commit comments