Exemple #1
0
 /**
  * @covers Redmine\Client
  * @test
  */
 public function testPrepareGetIssuesRequest()
 {
     // Create the object under test
     $client = new Client('https://test.local', 'USER_API-KEY159');
     // Perform the tests
     $client->prepareRequest('/issues.json', 'GET');
     $curlOptions = $client->getCurlOptions();
     $this->assertSame('https://test.local/issues.json', $curlOptions[CURLOPT_URL]);
     $this->assertSame(0, $curlOptions[CURLOPT_VERBOSE]);
     $this->assertSame(0, $curlOptions[CURLOPT_HEADER]);
     $this->assertSame(1, $curlOptions[CURLOPT_RETURNTRANSFER]);
     $this->assertArrayNotHasKey(CURLOPT_POST, $curlOptions);
     $this->assertArrayNotHasKey(CURLOPT_POSTFIELDS, $curlOptions);
     $this->assertArrayNotHasKey(CURLOPT_CUSTOMREQUEST, $curlOptions);
 }