Fixing #138
[akelos.git] / test / unit / lib / AkActionController.php
blobe36d94f6a9d4e3f342fca8a6408cd88bd97474e8
1 <?php
3 defined('ALL_TESTS_CALL') ? null : define("ALL_TESTS_CALL",true);
4 defined('AK_ENABLE_PROFILER') ? null : define('AK_ENABLE_PROFILER',true);
6 defined('AK_TEST_DATABASE_ON') ? null : define('AK_TEST_DATABASE_ON', true);
7 require_once(dirname(__FILE__).'/../../fixtures/config/config.php');
9 if(!defined('ALL_TESTS_RUNNER') && empty($test)){
10 $test = &new GroupTest('Akelos Framework Action Controller Tests');
11 define('ALL_TESTS_RUNNER', false);
14 @session_start();
16 $partial_tests = array(
17 'filters',
18 'locale_detection',
19 'partials',
20 'http_authentication',
21 'model_instantiation',
24 foreach ($partial_tests as $partial_test){
25 $test->addTestFile(AK_LIB_TESTS_DIRECTORY.DS.'AkActionController'.DS.'_'.$partial_test.'.php');
28 if(!ALL_TESTS_RUNNER){
29 if (TextReporter::inCli()) {
30 exit ($test->run(new TextReporter()) ? 0 : 1);
32 $test->run(new HtmlReporter());