Esempio n. 1
0
 /**
  * Test we can properly send PATCH parameters with
  * application/x-www-form-urlencoded content type
  *
  * @dataProvider parameterArrayProvider
  */
 public function testPatchData($params)
 {
     $client = $this->client;
     $client->setUri($this->baseuri . 'testPatchData.php');
     $client->setRawBody(serialize($params));
     $client->setMethod('PATCH');
     $this->assertEquals($client::ENC_URLENCODED, $this->client->getEncType());
     $this->assertTrue($client->getRequest()->isPatch());
     $res = $this->client->send();
     $this->assertEquals(serialize($params), $res->getBody(), "PATCH data integrity test failed");
 }
Esempio n. 2
0
 public function testClientRetrievesUppercaseHttpMethodFromRequestObject()
 {
     $client = new Client;
     $client->setMethod('post');
     $this->assertEquals(Client::ENC_URLENCODED, $client->getEncType());
 }