public function isMethodIdempotent() { return in_array($this->getMethod(), array('HEAD', 'GET', 'PUT', 'DELETE', 'TRACE', 'OPTIONS', 'PURGE')); }
/** * @dataProvider methodIdempotentProvider */ public function testMethodIdempotent($method, $idempotent) { $request = new Request(); $request->setMethod($method); $this->assertEquals($idempotent, $request->isMethodIdempotent()); }