Esempio n. 1
0
 /**
  * @depends testConnect
  * @depends testJsonResponse
  */
 public function testJsonRequest(ApiClient $docker, array $currentContainer)
 {
     $response = $docker->post('/containers/create', [], new requestHandlers\Json(['Image' => $currentContainer['Image'], 'HostConfig' => ['VolumesFrom' => [$currentContainer['Id']]]]));
     $responseHandler = new responseHandlers\Json($response);
     $newContainer = $responseHandler->getData();
     $this->assertArrayHasKey('Id', $newContainer);
     return $newContainer['Id'];
 }
 /**
  * @depends testConnect
  */
 public function test1(ApiClient $dockercloud)
 {
     $response = $dockercloud->get('/api/app/v1/service/');
     $responseHandler = new responseHandlers\Json($response);
     $this->assertTrue(is_array($responseHandler->getData()));
 }