public function testGetMethodWithOverrideParameterFromBodyObject() { $uri = Uri::createFromString('https://example.com:443/foo/bar?abc=123'); $headers = new Headers(['Content-Type' => 'application/x-www-form-urlencoded']); $cookies = []; $serverParams = []; $body = new RequestBody(); $body->write('_METHOD=PUT'); $body->rewind(); $request = new Request('POST', $uri, $headers, $cookies, $serverParams, $body); $this->assertEquals('PUT', $request->getMethod()); $this->assertEquals('POST', $request->getOriginalMethod()); }