From e4ed062d689776617b3b5be055ed256f07ada6d3 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Thu, 15 May 2025 13:57:03 +0200 Subject: fix(RouteParser): bail out if method name contains hashtag Signed-off-by: Ferdinand Thiessen --- tests/lib/AppFramework/Routing/RouteParserTest.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/lib/AppFramework/Routing/RouteParserTest.php') diff --git a/tests/lib/AppFramework/Routing/RouteParserTest.php b/tests/lib/AppFramework/Routing/RouteParserTest.php index ddfe0594ab2..406c5f1f3a5 100644 --- a/tests/lib/AppFramework/Routing/RouteParserTest.php +++ b/tests/lib/AppFramework/Routing/RouteParserTest.php @@ -142,6 +142,15 @@ class RouteParserTest extends \Test\TestCase { $this->parser->parseDefaultRoutes($routes, 'app1'); } + public function testParseRoutesInvalidName2(): void { + $routes = ['routes' => [ + ['name' => 'folders#open#action', 'url' => '/{folderId}/open', 'verb' => 'GET'] + ]]; + + $this->expectException(\UnexpectedValueException::class); + $this->parser->parseDefaultRoutes($routes, 'app1'); + } + public function testParseRoutesEmpty(): void { $routes = ['routes' => []]; -- cgit v1.2.3