public function isLocked(array $regions) { if (count($regions) == 0) { // no regions are locked from this call. return true; } foreach ($regions as $region) { if ($this->region == strtolower($region)) { // the region is fine return false; } } // the region was not found return true; }
public function testIsLockedFalse() { $region = new Region('euw'); $this->assertFalse($region->isLocked(['na', 'euw', 'eune'])); }