@@ -56,10 +56,12 @@ public function testBuild(
5656 $ this ->expectException ($ allowedException );
5757 }
5858
59- $ route = $ builder ->build ();
59+ try {
60+ $ route = $ builder ->build ();
61+ } catch (RouteInvalidConfigurationException $ configurationException ) {
62+ $ this ->assertNotEmpty ($ configurationException ->getMessages ());
6063
61- if ($ allowedException ) {
62- return ;
64+ throw $ configurationException ;
6365 }
6466
6567 $ this ->assertIsCallable ($ route ->getController ());
@@ -73,10 +75,11 @@ public function dataProvider()
7375 {
7476 return [
7577 ['test ' , function () {}, '/{test}.{_format} ' , '/\/(.[aA-zZ0-9-_]+)\.(.[aA-zZ0-9-_]+)/ ' , ['POST ' ], null ],
78+ ['test ' , function () {}, '/{test}-{date}.{_format} ' , '/\/(.[aA-zZ0-9-_]+)-(.[aA-zZ0-9-_]+)\.(.[aA-zZ0-9-_]+)/ ' , ['POST ' ], null ],
7679 [null , function () {}, '/{test}.{_format} ' , '/\/(.[aA-zZ0-9-_]+)\.(.[aA-zZ0-9-_]+)/ ' , null , null ],
7780 ['test ' , null , '/{test}.{_format} ' , null , null , RouteInvalidConfigurationException::class],
7881 ['test ' , function () {}, '/test ' , null , null , null ],
79- ['test ' , function () {} , null , null , null , RouteInvalidConfigurationException::class],
82+ ['test ' , null , null , null , null , RouteInvalidConfigurationException::class],
8083 ];
8184 }
8285}
0 commit comments