@@ -280,61 +280,6 @@ public function testMatchUrlNotFound(): void
280280 }
281281 }
282282
283- /**
284- * Test reverseRoute with named route
285- */
286- public function testReverseRouteWithName (): void
287- {
288- $ result = $ this ->RouteTools ->reverseRoute (name: 'projects:view ' , params: ['id ' => 123 ]);
289-
290- $ this ->assertArrayHasKey ('url ' , $ result );
291- $ this ->assertIsString ($ result ['url ' ]);
292- $ this ->assertStringContainsString ('projects ' , $ result ['url ' ]);
293- $ this ->assertArrayHasKey ('full ' , $ result );
294- $ this ->assertFalse ($ result ['full ' ]);
295- }
296-
297- /**
298- * Test reverseRoute with parameters
299- */
300- public function testReverseRouteWithParams (): void
301- {
302- $ result = $ this ->RouteTools ->reverseRoute (
303- params: ['controller ' => 'Pages ' , 'action ' => 'display ' , 'pass ' => ['home ' ]],
304- );
305-
306- $ this ->assertArrayHasKey ('url ' , $ result );
307- $ this ->assertIsString ($ result ['url ' ]);
308- }
309-
310- /**
311- * Test reverseRoute with full URL
312- */
313- public function testReverseRouteWithFullUrl (): void
314- {
315- $ result = $ this ->RouteTools ->reverseRoute (
316- name: 'home ' ,
317- params: [],
318- full: true ,
319- );
320-
321- $ this ->assertArrayHasKey ('url ' , $ result );
322- $ this ->assertArrayHasKey ('full ' , $ result );
323- $ this ->assertTrue ($ result ['full ' ]);
324- $ this ->assertStringContainsString ('http ' , $ result ['url ' ]);
325- }
326-
327- /**
328- * Test reverseRoute without name or params
329- */
330- public function testReverseRouteWithoutNameOrParams (): void
331- {
332- $ this ->expectException (ToolCallException::class);
333- $ this ->expectExceptionMessage ('Either name or params must be provided ' );
334-
335- $ this ->RouteTools ->reverseRoute ();
336- }
337-
338283 /**
339284 * Test detectRouteCollisions
340285 */
@@ -519,31 +464,6 @@ public function testMatchUrlWithMixedCaseMethod(): void
519464 $ this ->assertEquals ('GET ' , $ result ['method ' ]);
520465 }
521466
522- /**
523- * Test reverseRoute error handling with invalid name
524- */
525- public function testReverseRouteWithInvalidName (): void
526- {
527- $ this ->expectException (ToolCallException::class);
528- $ this ->expectExceptionMessage ('Error generating URL ' );
529-
530- $ this ->RouteTools ->reverseRoute (name: 'totally:nonexistent:route:name:xyz ' );
531- }
532-
533- /**
534- * Test reverseRoute with name and multiple parameters
535- */
536- public function testReverseRouteWithNameAndMultipleParams (): void
537- {
538- $ result = $ this ->RouteTools ->reverseRoute (
539- name: 'projects:edit ' ,
540- params: ['id ' => 456 , 'extra ' => 'value ' ],
541- );
542-
543- $ this ->assertArrayHasKey ('url ' , $ result );
544- $ this ->assertIsString ($ result ['url ' ]);
545- }
546-
547467 /**
548468 * Test detectRouteCollisions with routes without methods
549469 */
0 commit comments