getName() public method

Returns the name of the test.
public getName ( ) : string
return string
Beispiel #1
0
 public function testYouCanIterateOverTheContainer()
 {
     $test = new Test('mySetTest');
     $this->container[$test->getName()] = $test;
     foreach ($this->container as $test) {
         $this->assertEquals('mySetTest', $test->getName());
     }
 }
Beispiel #2
0
 /**
  * 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;
 }