Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatthieu_ <matthieu_@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2007-07-24 16:57:04 +0400
committermatthieu_ <matthieu_@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2007-07-24 16:57:04 +0400
commita105bf4d9021d0e0f003d06418e6002fc7cfb16e (patch)
tree83a11cf9d9f02aaa41b0b7c93674eea72abe7912 /tests/all_tests.php
parente7c34bf93ae288f17ec1402660e9e5a83e1cb72e (diff)
First code commit
(from subclipse)
Diffstat (limited to 'tests/all_tests.php')
-rwxr-xr-xtests/all_tests.php52
1 files changed, 52 insertions, 0 deletions
diff --git a/tests/all_tests.php b/tests/all_tests.php
new file mode 100755
index 0000000000..ca86d5da33
--- /dev/null
+++ b/tests/all_tests.php
@@ -0,0 +1,52 @@
+<?php
+if(!defined("PATH_TEST_TO_ROOT")) {
+ define('PATH_TEST_TO_ROOT', '..');
+}
+require_once PATH_TEST_TO_ROOT . "/tests/config_test.php";
+
+/*
+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
+assertPattern($p, $x) Fail unless the regex $p matches $x
+assertNoPattern($p, $x) Fail if the regex $p matches $x
+expectError($x) Swallows any upcoming matching error
+assert($e) Fail on failed expectation object $e
+ */
+require_once(SIMPLE_TEST . 'unit_tester.php');
+require_once(SIMPLE_TEST . 'reporter.php');
+
+$test = &new GroupTest('All Piwik Tests');
+
+$toInclude = array();
+
+foreach(glob("*/*.php") as $file)
+{
+ if(!ereg("simpletest/",$file))
+ {
+ $toInclude[] = $file;
+ }
+}
+
+foreach($toInclude as $file)
+{
+ if(substr_count($file,"test.php")==0)
+ {
+ print("The file $file doesn't end with the '.test.php' extension. \n<br>");
+ }
+
+ $test->addFile($file);
+}
+$test->run(new HtmlReporter());
+?> \ No newline at end of file