From 9d18ad2364a55f4c203c43ac60936e673da20a50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Tue, 19 Aug 2025 12:46:12 +0200 Subject: [PATCH] Add double slash tests --- tests/e2e/BaseTest.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/tests/e2e/BaseTest.php b/tests/e2e/BaseTest.php index f7be2237..84b2f211 100644 --- a/tests/e2e/BaseTest.php +++ b/tests/e2e/BaseTest.php @@ -80,4 +80,28 @@ public function testNotFound() $this->assertEquals(404, $response['headers']['status-code']); $this->assertStringStartsWith('Not Found on ', $response['body']); } + + + public function testDoubleSlash() + { + $response = $this->client->call(Client::METHOD_GET, '//'); + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals('Hello World!', $response['body']); + + $response = $this->client->call(Client::METHOD_GET, '//path-404'); + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals('Hello World!', $response['body']); + + $response = $this->client->call(Client::METHOD_GET, '//value/123'); + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEmpty($response['body']); + + $response = $this->client->call(Client::METHOD_GET, '/value//123'); + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEmpty($response['body']); + + $response = $this->client->call(Client::METHOD_GET, '//value//123'); + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEmpty($response['body']); + } }