コード例 #1
0
 /**
  * @return Model
  */
 private function getTestModel()
 {
     $Facker = FackerFactory::create();
     $Model = new Model();
     $RegionAPI = new RegionAPI();
     $NodeTypeAPI = new NodeTypeAPI();
     $this->mockResponse(200, RegionTest::getMockData());
     $Region = $RegionAPI->get('aws', 'eu-west-1');
     $this->mockResponse(200, NodeTypeTest::getMockData());
     $NodeType = $NodeTypeAPI->get('aws', 't2.nano');
     $Model->setName('Cluster-test-' . $Facker->lexify())->setRegion($Region->getResourceUri())->setNodeType($NodeType->getResourceUri())->setTargetNumNodes(1)->setDisk(10)->setTags(['unit-test']);
     return $Model;
 }
コード例 #2
0
 /**
  * @return string
  */
 protected function getMockData()
 {
     return APITest::getMockData();
 }