diff options
author | Andreas Gohr <andi@splitbrain.org> | 2005-11-02 23:26:04 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2005-11-02 23:26:04 +0100 |
commit | 6534245afc8e6007567455a841347fafb2413cc0 (patch) | |
tree | 91a25540957de0801e715c0535c7beb7a38690f3 | |
parent | 72645b754b40e57485ed859b9b5416c604536c79 (diff) | |
download | rpg-6534245afc8e6007567455a841347fafb2413cc0.tar.gz rpg-6534245afc8e6007567455a841347fafb2413cc0.tar.bz2 |
some fixes in the testmanagement
darcs-hash:20051102222604-7ad00-f8f3ae8435f8d6f6d738daaec205c541a371e9c7.gz
-rw-r--r-- | _test/cases/inc/html_hilight.test.php | 2 | ||||
-rw-r--r-- | _test/lib/testmanager.php | 18 | ||||
-rw-r--r-- | inc/init.php | 2 |
3 files changed, 20 insertions, 2 deletions
diff --git a/_test/cases/inc/html_hilight.test.php b/_test/cases/inc/html_hilight.test.php index 304cc71b8..450e8d6d5 100644 --- a/_test/cases/inc/html_hilight.test.php +++ b/_test/cases/inc/html_hilight.test.php @@ -12,7 +12,7 @@ function html_hilight_test_unslash($string,$char="'"){ return $str;
}
-class html_hilight_test extends UnitTestCase {
+class html_hilight_test extends UnitTestCase{
function setup() {
runkit_function_rename('html_hilight_test_unslash','unslash');
diff --git a/_test/lib/testmanager.php b/_test/lib/testmanager.php index 9fb73daf6..70a2cd979 100644 --- a/_test/lib/testmanager.php +++ b/_test/lib/testmanager.php @@ -6,6 +6,16 @@ define('TEST_GROUPS',realpath(dirname(__FILE__).'/../cases')); define('TEST_CASES',realpath(dirname(__FILE__).'/../cases')); +// try to load runkit extension +if (!extension_loaded('runkit')) { + if (strtoupper(substr(PHP_OS, 0, 3) == 'WIN')) { + dl('php_runkit.dll'); + } else { + dl('runkit.so'); + } +} + + class TestManager { var $_testcase_extension = '.test.php'; var $_grouptest_extension = '.group.php'; @@ -22,6 +32,14 @@ class TestManager { define($key, $value); } TestManager::_installSimpleTest(); + + list($version) = file(SIMPLE_TEST.'VERSION'); + $version = trim($version); + if(!version_compare('1.0.1alpha',$version,'<')){ + echo "At least SimpleTest Version 1.0.1alpha is required."; + echo " Yours is $version\n"; + exit; + } } function _installSimpleTest() { diff --git a/inc/init.php b/inc/init.php index 44154a039..f9e095533 100644 --- a/inc/init.php +++ b/inc/init.php @@ -50,7 +50,7 @@ @ini_set('arg_separator.output', '&'); // init session - if (!headers_sent() && !defined(NOSESSION)){ + if (!headers_sent() && !defined('NOSESSION')){ session_name("DokuWiki"); session_start(); } |