@@ -80,4 +80,28 @@ public function testNotFound()
8080 $ this ->assertEquals (404 , $ response ['headers ' ]['status-code ' ]);
8181 $ this ->assertStringStartsWith ('Not Found on ' , $ response ['body ' ]);
8282 }
83+
84+
85+ public function testDoubleSlash ()
86+ {
87+ $ response = $ this ->client ->call (Client::METHOD_GET , '// ' );
88+ $ this ->assertEquals (200 , $ response ['headers ' ]['status-code ' ]);
89+ $ this ->assertEquals ('Hello World! ' , $ response ['body ' ]);
90+
91+ $ response = $ this ->client ->call (Client::METHOD_GET , '//path-404 ' );
92+ $ this ->assertEquals (200 , $ response ['headers ' ]['status-code ' ]);
93+ $ this ->assertEquals ('Hello World! ' , $ response ['body ' ]);
94+
95+ $ response = $ this ->client ->call (Client::METHOD_GET , '//value/123 ' );
96+ $ this ->assertEquals (200 , $ response ['headers ' ]['status-code ' ]);
97+ $ this ->assertEmpty ($ response ['body ' ]);
98+
99+ $ response = $ this ->client ->call (Client::METHOD_GET , '/value//123 ' );
100+ $ this ->assertEquals (200 , $ response ['headers ' ]['status-code ' ]);
101+ $ this ->assertEmpty ($ response ['body ' ]);
102+
103+ $ response = $ this ->client ->call (Client::METHOD_GET , '//value//123 ' );
104+ $ this ->assertEquals (200 , $ response ['headers ' ]['status-code ' ]);
105+ $ this ->assertEmpty ($ response ['body ' ]);
106+ }
83107}
0 commit comments