@@ -162,7 +162,7 @@ public function testConstructorWithInvalidMethod($invalidMethod) : void
162162 public function testConstructorWithInvalidMiddleware ($ invalidMiddleware ) : void
163163 {
164164 $ this ->expectException (InvalidDescriptorArgumentException::class);
165- $ this ->expectExceptionMessage ('#[Route.middlewares] must contain non-empty strings . ' );
165+ $ this ->expectExceptionMessage ('#[Route.middlewares] must contain the class names of existing middlewares . ' );
166166
167167 new Route ('foo ' , null , '/foo ' , ['GET ' ], [$ invalidMiddleware ]);
168168 }
@@ -186,7 +186,7 @@ public function testConstructorWithInvalidTag($invalidTag) : void
186186 public function testConstructorWithNonexistentMiddleware () : void
187187 {
188188 $ this ->expectException (InvalidDescriptorArgumentException::class);
189- $ this ->expectExceptionMessage ('#[Route.middlewares] must contain existing middlewares. ' );
189+ $ this ->expectExceptionMessage ('#[Route.middlewares] must contain the class names of existing middlewares. ' );
190190
191191 new Route ('foo ' , null , '/foo ' , ['GET ' ], ['nonexistentClass ' ]);
192192 }
@@ -197,7 +197,7 @@ public function testConstructorWithNonexistentMiddleware() : void
197197 public function testConstructorWithNonMiddlewareMiddleware () : void
198198 {
199199 $ this ->expectException (InvalidDescriptorArgumentException::class);
200- $ this ->expectExceptionMessage ('#[Route.middlewares] must contain existing middlewares. ' );
200+ $ this ->expectExceptionMessage ('#[Route.middlewares] must contain the class names of existing middlewares. ' );
201201
202202 new Route ('foo ' , null , '/foo ' , ['GET ' ], [stdClass::class]);
203203 }
0 commit comments