Skip to content
Snippets Groups Projects
Commit b0ffdb5e authored by Adrian Lang's avatar Adrian Lang
Browse files

Make tests PHP 5.3 compatible

parent 689cba4d
No related branches found
No related tags found
No related merge requests found
...@@ -2,9 +2,7 @@ ...@@ -2,9 +2,7 @@
require_once DOKU_INC.'inc/html.php'; require_once DOKU_INC.'inc/html.php';
if ( !extension_loaded('runkit') && if (!extension_loaded('runkit')) {
!@dl('runkit.dll') &&
!@dl('runkit.so' ) ){
SimpleTestOptions::ignore('html_hilight_test'); SimpleTestOptions::ignore('html_hilight_test');
trigger_error('Skipping html_hilight_test - http://www.php.net/runkit required'); trigger_error('Skipping html_hilight_test - http://www.php.net/runkit required');
} }
......
...@@ -5,9 +5,7 @@ require_once 'parser.inc.php'; ...@@ -5,9 +5,7 @@ require_once 'parser.inc.php';
require_once DOKU_INC.'inc/parser/xhtml.php'; require_once DOKU_INC.'inc/parser/xhtml.php';
require_once DOKU_INC.'inc/geshi.php'; require_once DOKU_INC.'inc/geshi.php';
if ( !extension_loaded('runkit') && if (!extension_loaded('runkit')) {
!@dl('runkit.dll') &&
!@dl('runkit.so' ) ){
SimpleTestOptions::ignore('xhtml_htmlphp_test'); SimpleTestOptions::ignore('xhtml_htmlphp_test');
trigger_error('Skipping xhtml_htmlphp_test - http://www.php.net/runkit required'); trigger_error('Skipping xhtml_htmlphp_test - http://www.php.net/runkit required');
} }
......
...@@ -71,7 +71,7 @@ class js_js_compress_test extends UnitTestCase { ...@@ -71,7 +71,7 @@ class js_js_compress_test extends UnitTestCase {
function test_dquotrunaway(){ function test_dquotrunaway(){
$text = 'var foo="Now where does it end'; $text = 'var foo="Now where does it end';
$this->assertEqual(js_compress($text), "$text"); $this->assertEqual(js_compress($text), $text);
} }
function test_squot1(){ function test_squot1(){
...@@ -81,7 +81,7 @@ class js_js_compress_test extends UnitTestCase { ...@@ -81,7 +81,7 @@ class js_js_compress_test extends UnitTestCase {
function test_squotrunaway(){ function test_squotrunaway(){
$text = "var foo='Now where does it end"; $text = "var foo='Now where does it end";
$this->assertEqual(js_compress($text), "$text"); $this->assertEqual(js_compress($text), $text);
} }
function test_nl1(){ function test_nl1(){
......
...@@ -7,7 +7,7 @@ define('TEST_GROUPS',realpath(dirname(__FILE__).'/../cases')); ...@@ -7,7 +7,7 @@ define('TEST_GROUPS',realpath(dirname(__FILE__).'/../cases'));
define('TEST_CASES',realpath(dirname(__FILE__).'/../cases')); define('TEST_CASES',realpath(dirname(__FILE__).'/../cases'));
// try to load runkit extension // try to load runkit extension
if (!extension_loaded('runkit')) { if (!extension_loaded('runkit') && function_exists('dl')) {
if (strtoupper(substr(PHP_OS, 0, 3) == 'WIN')) { if (strtoupper(substr(PHP_OS, 0, 3) == 'WIN')) {
@dl('php_runkit.dll'); @dl('php_runkit.dll');
} else { } else {
...@@ -15,7 +15,6 @@ if (!extension_loaded('runkit')) { ...@@ -15,7 +15,6 @@ if (!extension_loaded('runkit')) {
} }
} }
class TestManager { class TestManager {
var $_testcase_extension = '.test.php'; var $_testcase_extension = '.test.php';
var $_grouptest_extension = '.group.php'; var $_grouptest_extension = '.group.php';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment