From 1a63671c8f7d9b455ae42d3b0cf3670cb87a59b3 Mon Sep 17 00:00:00 2001 From: Jean Paiva Date: Fri, 28 Sep 2018 15:49:20 -0300 Subject: [PATCH] Test Map route with lowercase method --- tests/AppTest.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/AppTest.php b/tests/AppTest.php index 742c57344..e3fcd3c4b 100644 --- a/tests/AppTest.php +++ b/tests/AppTest.php @@ -241,6 +241,19 @@ public function testMapRoute() $this->assertAttributeContains('POST', 'methods', $route); } + public function testMapRouteWithLowercaseMethod() + { + $path = '/foo'; + $callable = function ($req, $res) { + // Do something + }; + $app = new App($this->getResponseFactory()); + $route = $app->map(['get'], $path, $callable); + + $this->assertInstanceOf('\Slim\Route', $route); + $this->assertAttributeContains('get', 'methods', $route); + } + public function testRedirectRoute() { $source = '/foo';