private function getRegions(DigitalOcean $digitalOcean) { foreach ($digitalOcean->regions()->getAll()->regions as $region) { $regions[$region->id] = $region->name; } return $regions; }
public function testReturnsRegionInstance() { $digitalOcean = new DigitalOcean($this->getMockCredentials(), $this->getMockAdapter($this->never())); $regions = $digitalOcean->regions(); $this->assertTrue(is_object($regions)); $this->assertInstanceOf('\\DigitalOcean\\Regions\\Regions', $regions); }