public function getMethod() { if (empty($this->method)) { $this->method = strtolower($this->httpRequest()->getRequestMethod()); } return $this->method; }
public function testSetGetMethod() { $r = new Router('ExampleApi', 'Webiny\\Component\\Rest\\Tests\\Mocks\\MockApiClassRouter', true, self::$cache); $r->setHttpMethod('GET'); $this->assertSame('get', $r->getMethod()); }