private function randomize(TestSuiteInterface $test_suite) { $possibles = $test_suite->getAvailableVersions(); if (count($possibles) == 0) { throw new ErrorNoVersionAvailable(); } return $possibles[array_rand($possibles)]; }
public function remove(TestSuiteInterface $test_suite) { $found = null; foreach ($this->test_suites as $i => $persisted_test_suite) { if ($persisted_test_suite->getUID() == $test_suite->getUID()) { $found = $i; break; } } if (!is_null($found)) { unset($this->test_suites[$found]); $this->test_suites = array_values($this->test_suites); // FIX keys } }
public function setVersion(TestSuiteInterface $test_suite, $version) { $this->version[$test_suite->getUID()] = $version; }