$test =& new GroupTest('Piwik - running all tests'); $toInclude = array(); foreach (globr(PIWIK_INCLUDE_PATH . '/tests/core/', '*.php') as $file) { $toInclude[] = $file; } foreach ($toInclude as $file) { if (substr_count($file, 'test.php') == 0) { print "The file '{$file}' is not valid: doesn't end with '.test.php' extension. \n<br>"; continue; } $test->addFile($file); } $timer = new Piwik_Timer(); $test->run(new HtmlReporter()); echo $timer . "<br>"; echo $timer->getMemoryLeak(); /* assertTrue($x) Fail if $x is false assertFalse($x) Fail if $x is true assertNull($x) Fail if $x is set assertNotNull($x) Fail if $x not set assertIsA($x, $t) Fail if $x is not the class or type $t assertNotA($x, $t) Fail if $x is of the class or type $t assertEqual($x, $y) Fail if $x == $y is false assertNotEqual($x, $y) Fail if $x == $y is true assertWithinMargin($x, $y, $m) Fail if abs($x - $y) < $m is false assertOutsideMargin($x, $y, $m) Fail if abs($x - $y) < $m is true assertIdentical($x, $y) Fail if $x == $y is false or a type mismatch assertNotIdentical($x, $y) Fail if $x == $y is true and types match assertReference($x, $y) Fail unless $x and $y are the same variable assertClone($x, $y) Fail unless $x and $y are identical copies