From 13e62cb3c72c33042f0a30445b99500db7c765ee Mon Sep 17 00:00:00 2001 From: brettp Date: Fri, 2 Oct 2009 21:59:32 +0000 Subject: Added unit tests. git-svn-id: http://code.elgg.org/elgg/trunk@3504 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/tests/entities.php | 12 ++++++++++++ engine/tests/suite.php | 6 ++++++ 2 files changed, 18 insertions(+) create mode 100644 engine/tests/entities.php (limited to 'engine/tests') diff --git a/engine/tests/entities.php b/engine/tests/entities.php new file mode 100644 index 000000000..76478802b --- /dev/null +++ b/engine/tests/entities.php @@ -0,0 +1,12 @@ +assertTrue(FALSE); + } +} + +// ElggEntity is an abstract class with no abstact methods. +class ElggEntityTest extends ElggEntity { } diff --git a/engine/tests/suite.php b/engine/tests/suite.php index 5eed796ac..baf32481f 100755 --- a/engine/tests/suite.php +++ b/engine/tests/suite.php @@ -21,6 +21,12 @@ require_once( "$test_path/elgg_unit_test.php" ); $suite = new TestSuite( 'Elgg Core Unit Tests' ); +// emit a hook to pull in all tests +$test_files = trigger_plugin_hook('unit_test', 'system', null, array()); +foreach ($test_files as $file) { + $suite->addTestFile($file); +} + if (!$CONFIG->debug) { if ( TextReporter::inCli() ) { -- cgit v1.2.3