Adding tests for securing private variable inclussion on templates.
[akelos.git] / test / unit / lib / AkActiveRecord.php
blob444318c805969fdf6c0ffce504e7de4961bab0c5
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 Active Record Tests');
11 define('ALL_TESTS_RUNNER', false);
12 @session_start();
15 //these partials are not refactored yet. so they must be run in sequence!
16 $partial_tests = array(
17 '_AkActiveRecord_1.php',
18 '_AkActiveRecord_2.php',
19 '_AkActiveRecord_3.php'
22 foreach ($partial_tests as $partial_test){
23 $test->addTestFile(AK_LIB_TESTS_DIRECTORY.DS.'AkActiveRecord'.DS.$partial_test);
26 // Acts as, Validators, Associations and Observer tests
27 if(!ALL_TESTS_RUNNER){
28 foreach (Ak::dir(AK_LIB_TESTS_DIRECTORY.DS.'AkActiveRecord') as $active_record_test){
29 if(!is_array($active_record_test) && !in_array($active_record_test, $partial_tests)){
30 $test->addTestFile(AK_LIB_TESTS_DIRECTORY.DS.'AkActiveRecord'.DS.$active_record_test);
36 if(!ALL_TESTS_RUNNER){
37 if (TextReporter::inCli()) {
38 exit ($test->run(new TextReporter()) ? 0 : 1);
40 $test->run(new HtmlReporter());