File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1188,24 +1188,20 @@ static function () {},
11881188 $ this ->assertSame ($ options , ['as ' => 'admin ' , 'foo ' => 'baz ' ]);
11891189 }
11901190
1191- public function testRoutesOptionsWithSameFromTwoRoutes ()
1191+ /**
1192+ * @dataProvider optionsProvider
1193+ */
1194+ public function testRoutesOptionsWithSameFromTwoRoutes (array $ options1 , array $ options2 )
11921195 {
11931196 $ routes = $ this ->getCollector ();
11941197
11951198 // This is the first route for `administrator`.
1196- $ options1 = [
1197- 'as ' => 'admin ' ,
1198- 'foo ' => 'options1 ' ,
1199- ];
12001199 $ routes ->get (
12011200 'administrator ' ,
12021201 static function () {},
12031202 $ options1
12041203 );
12051204 // The second route for `administrator` should be ignored.
1206- $ options2 = [
1207- 'foo ' => 'options2 ' ,
1208- ];
12091205 $ routes ->get (
12101206 'administrator ' ,
12111207 static function () {},
@@ -1217,6 +1213,48 @@ static function () {},
12171213 $ this ->assertSame ($ options , $ options1 );
12181214 }
12191215
1216+ public function optionsProvider ()
1217+ {
1218+ yield from [
1219+ [
1220+ [
1221+ 'foo ' => 'options1 ' ,
1222+ ],
1223+ [
1224+ 'foo ' => 'options2 ' ,
1225+ ],
1226+ ],
1227+ [
1228+ [
1229+ 'as ' => 'admin ' ,
1230+ 'foo ' => 'options1 ' ,
1231+ ],
1232+ [
1233+ 'foo ' => 'options2 ' ,
1234+ ],
1235+ ],
1236+ [
1237+ [
1238+ 'foo ' => 'options1 ' ,
1239+ ],
1240+ [
1241+ 'as ' => 'admin ' ,
1242+ 'foo ' => 'options2 ' ,
1243+ ],
1244+ ],
1245+ [
1246+ [
1247+ 'as ' => 'admin ' ,
1248+ 'foo ' => 'options1 ' ,
1249+ ],
1250+ [
1251+ 'as ' => 'admin ' ,
1252+ 'foo ' => 'options2 ' ,
1253+ ],
1254+ ],
1255+ ];
1256+ }
1257+
12201258 public function testRoutesOptionsForDifferentVerbs ()
12211259 {
12221260 $ routes = $ this ->getCollector ();
You can’t perform that action at this time.
0 commit comments