5 define('ALL_TESTS_CALL',true);
6 define('ALL_TESTS_RUNNER',true);
8 defined('AK_TEST_DATABASE_ON') ?
null : define('AK_TEST_DATABASE_ON', true);
9 require_once(dirname(__FILE__
).DIRECTORY_SEPARATOR
.'fixtures'.DIRECTORY_SEPARATOR
.'config'.DIRECTORY_SEPARATOR
.'config.php');
11 require_once(AK_LIB_DIR
.DS
.'AkInstaller.php');
12 require_once(AK_APP_DIR
.DS
.'installers'.DS
.'framework_installer.php');
13 $installer = new FrameworkInstaller();
14 $installer->uninstall();
15 $installer->install();
19 $test = &new GroupTest('Unit tests for the Akelos Framework');
21 function load_tests($dir, &$test)
24 while (false !== ($entry = $d->read())) {
25 if($entry != '.' && $entry != '..' && $entry[0] != '.' && $entry[0] != '_') {
26 $entry = $dir.DS
.$entry;
28 load_tests($entry, $test);
30 if(!strstr(file_get_contents($entry), 'ALL_TESTS_RUNNER')){
31 $test->addTestFile($entry);
41 load_tests(AK_TEST_DIR
.DS
.'unit'.DS
.'lib', $test);
43 if (TextReporter
::inCli()) {
44 exit ($test->run(new TextReporter()) ?
0 : 1);
46 $test->run(new HtmlReporter());