From d54b5bac81a5d6874c79ba9ff24f5a8392403208 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 2e7dfa581..6b671a7ef 100644 --- a/tests/AppTest.php +++ b/tests/AppTest.php @@ -275,6 +275,19 @@ public function testMapRoute() $this->assertAttributeContains('POST', 'methods', $route); } + public function testMapRouteWithLowercaseMethod() + { + $path = '/foo'; + $callable = function ($req, $res) { + // Do something + }; + $app = new App(); + $route = $app->map(['get'], $path, $callable); + + $this->assertInstanceOf('\Slim\Route', $route); + $this->assertAttributeContains('get', 'methods', $route); + } + public function testRedirectRoute() { $source = '/foo';