Ejemplo n.º 1
0
 /**
  * testJobList
  *
  * @return void
  */
 public function testJobList()
 {
     $this->_job->getHttpClient()->setAdapter($this->_httpClientAdapterTest);
     $this->_httpClientAdapterTest->setResponse($this->_loadResponse(__FUNCTION__));
     $joblist = $this->_job->getList();
     $this->assertEquals(count($joblist), 2);
     $this->assertEquals($joblist->getStatus(), 'success');
     $job = $joblist[0];
     $this->assertEquals($job->getAttribute('id'), '583288');
     $this->assertEquals($job->getAttribute('owner'), '*****@*****.**');
     $command = $job->getAttribute('command');
     $this->assertEquals($command['name'], 'DeleteVirtualServer');
     $history = $job->getAttribute('history');
     $this->assertEquals($history[0]['id'], '3303238');
     $this->assertEquals(count($history), 4);
 }
Ejemplo n.º 2
0
 public function testListServer()
 {
     $result = $this->gogrid->getList();
     $this->assertTrue($result->isSuccess());
     $found = false;
     foreach ($result as $server) {
         if ($server->getAttribute('name') == 'test-zf') {
             $found = true;
             break;
         }
     }
     $this->assertTrue($found);
 }