Exemple #1
0
 /**
  * @covers ByJG\Util\WebRequest::put
  */
 public function testPut5()
 {
     $this->object = new WebRequest(self::SERVER_TEST . '?extra=ok');
     $response = $this->object->put(['param' => 'value']);
     $this->assertEquals(200, $this->object->getLastStatus());
     $result = json_decode($response, true);
     $expected = ['content-type' => 'application/x-www-form-urlencoded', 'method' => 'PUT', 'query_string' => ['extra' => 'ok'], 'post_string' => [], 'payload' => 'param=value'];
     $this->assertEquals($expected, $result);
 }