diff --git a/application/tests/Integration/UrlIntegrationTest.php b/application/tests/Integration/UrlIntegrationTest.php new file mode 100644 index 0000000..bf9602f --- /dev/null +++ b/application/tests/Integration/UrlIntegrationTest.php @@ -0,0 +1,39 @@ +parameterlesGetRouteTest($url, 200); + } + } + + public function testParameterlesGetRoutes302(): void + { + foreach (['/logout'] as $url) { + $this->parameterlesGetRouteTest($url, 302); + } + } + + private function parameterlesGetRouteTest(string $url, int $status) + { + $request = new Request([], [], [], [], [], ['REQUEST_URI' => $url, null]); + $request->setMethod(Request::METHOD_GET); + $response = static::$kernel->handle($request); + $this->assertEquals($status, $response->getStatusCode()); + } +}