@@ -56,6 +56,8 @@ public function testReverseRoutingFindsSimpleMatch()
5656 {
5757 $ routes = $ this ->getCollector ();
5858
59+ // @TODO Do not put any placeholder after (:any).
60+ // Because the number of parameters passed to the controller method may change.
5961 $ routes ->add ('path/(:any)/to/(:num) ' , 'myController::goto/$1/$2 ' );
6062
6163 $ match = $ routes ->reverseRoute ('myController::goto ' , 'string ' , 13 );
@@ -67,6 +69,8 @@ public function testReverseRoutingWithLocaleAndFindsSimpleMatch()
6769 {
6870 $ routes = $ this ->getCollector ();
6971
72+ // @TODO Do not put any placeholder after (:any).
73+ // Because the number of parameters passed to the controller method may change.
7074 $ routes ->add ('{locale}/path/(:any)/to/(:num) ' , 'myController::goto/$1/$2 ' );
7175
7276 $ match = $ routes ->reverseRoute ('myController::goto ' , 'string ' , 13 );
@@ -78,6 +82,8 @@ public function testReverseRoutingReturnsFalseWithBadParamCount()
7882 {
7983 $ routes = $ this ->getCollector ();
8084
85+ // @TODO Do not put any placeholder after (:any).
86+ // Because the number of parameters passed to the controller method may change.
8187 $ routes ->add ('path/(:any)/to/(:num) ' , 'myController::goto/$1 ' );
8288
8389 $ this ->assertFalse ($ routes ->reverseRoute ('myController::goto ' , 'string ' , 13 ));
@@ -87,6 +93,8 @@ public function testReverseRoutingReturnsFalseWithNoMatch()
8793 {
8894 $ routes = $ this ->getCollector ();
8995
96+ // @TODO Do not put any placeholder after (:any).
97+ // Because the number of parameters passed to the controller method may change.
9098 $ routes ->add ('path/(:any)/to/(:num) ' , 'myController::goto/$1/$2 ' );
9199
92100 $ this ->assertFalse ($ routes ->reverseRoute ('myBadController::goto ' , 'string ' , 13 ));
@@ -96,6 +104,8 @@ public function testReverseRoutingThrowsExceptionWithBadParamTypes()
96104 {
97105 $ routes = $ this ->getCollector ();
98106
107+ // @TODO Do not put any placeholder after (:any).
108+ // Because the number of parameters passed to the controller method may change.
99109 $ routes ->add ('path/(:any)/to/(:num) ' , 'myController::goto/$1/$2 ' );
100110
101111 $ this ->expectException (RouterException::class);
0 commit comments