public function testYouCanIterateOverTheContainer() { $test = new Test('mySetTest'); $this->container[$test->getName()] = $test; foreach ($this->container as $test) { $this->assertEquals('mySetTest', $test->getName()); } }
/** * Calculates a seed for the given $test, mixing the global seed and a * numerical representation of the test name. * * @param int $globalSeed * @param \Namshi\AB\Test $test * @return int */ protected function calculateTestSeed($globalSeed, Test $test) { $seed = hexdec(substr(md5($test->getName()), 0, 7)); if ($seed > $globalSeed) { return $seed - $globalSeed; } return $globalSeed - $seed; }