]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Added unit tests.
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Fri, 2 Oct 2009 21:59:32 +0000 (21:59 +0000)
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Fri, 2 Oct 2009 21:59:32 +0000 (21:59 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@3504 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/tests/entities.php [new file with mode: 0644]
engine/tests/suite.php

diff --git a/engine/tests/entities.php b/engine/tests/entities.php
new file mode 100644 (file)
index 0000000..7647880
--- /dev/null
@@ -0,0 +1,12 @@
+<?php
+
+
+class ElggCoreEntityTest extends ElggCoreUnitTest {
+
+       public function testElggEntityConstructor() {
+               $this->assertTrue(FALSE);
+       }
+}
+
+// ElggEntity is an abstract class with no abstact methods.
+class ElggEntityTest extends ElggEntity { }
index 5eed796acada4e592b53a569428d161cf918644c..baf32481f3838835195ef2c3f098a3086c608002 100755 (executable)
@@ -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() )
        {