Exemplo n.º 1
0
 private function randomize(TestSuiteInterface $test_suite)
 {
     $possibles = $test_suite->getAvailableVersions();
     if (count($possibles) == 0) {
         throw new ErrorNoVersionAvailable();
     }
     return $possibles[array_rand($possibles)];
 }
Exemplo n.º 2
0
 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
     }
 }
Exemplo n.º 3
0
 public function setVersion(TestSuiteInterface $test_suite, $version)
 {
     $this->version[$test_suite->getUID()] = $version;
 }