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']); + } }