summaryrefslogtreecommitdiff
path: root/_test
diff options
context:
space:
mode:
authorAdrian Lang <lang@cosmocode.de>2010-03-23 15:22:21 +0100
committerAdrian Lang <lang@cosmocode.de>2010-03-23 15:27:31 +0100
commitb0ffdb5e96bb2bdbf27087b2f1335f7949ab8598 (patch)
tree15eedac1e2c83c92090f3d6ee0ade010dbcd89c9 /_test
parent689cba4d4ba37bdcb57ea6c6bbf55e7546d428c3 (diff)
downloadrpg-b0ffdb5e96bb2bdbf27087b2f1335f7949ab8598.tar.gz
rpg-b0ffdb5e96bb2bdbf27087b2f1335f7949ab8598.tar.bz2
Make tests PHP 5.3 compatible
Diffstat (limited to '_test')
-rw-r--r--_test/cases/inc/html_hilight.test.php4
-rw-r--r--_test/cases/inc/parser/xhtml_htmlphp.test.php4
-rw-r--r--_test/cases/lib/exe/js_js_compress.test.php4
-rw-r--r--_test/lib/testmanager.php3
4 files changed, 5 insertions, 10 deletions
diff --git a/_test/cases/inc/html_hilight.test.php b/_test/cases/inc/html_hilight.test.php
index 85f224b6e..cc5579c71 100644
--- a/_test/cases/inc/html_hilight.test.php
+++ b/_test/cases/inc/html_hilight.test.php
@@ -2,9 +2,7 @@
require_once DOKU_INC.'inc/html.php';
-if ( !extension_loaded('runkit') &&
- !@dl('runkit.dll') &&
- !@dl('runkit.so' ) ){
+if (!extension_loaded('runkit')) {
SimpleTestOptions::ignore('html_hilight_test');
trigger_error('Skipping html_hilight_test - http://www.php.net/runkit required');
}
diff --git a/_test/cases/inc/parser/xhtml_htmlphp.test.php b/_test/cases/inc/parser/xhtml_htmlphp.test.php
index 3493bab4d..65d64e579 100644
--- a/_test/cases/inc/parser/xhtml_htmlphp.test.php
+++ b/_test/cases/inc/parser/xhtml_htmlphp.test.php
@@ -5,9 +5,7 @@ require_once 'parser.inc.php';
require_once DOKU_INC.'inc/parser/xhtml.php';
require_once DOKU_INC.'inc/geshi.php';
-if ( !extension_loaded('runkit') &&
- !@dl('runkit.dll') &&
- !@dl('runkit.so' ) ){
+if (!extension_loaded('runkit')) {
SimpleTestOptions::ignore('xhtml_htmlphp_test');
trigger_error('Skipping xhtml_htmlphp_test - http://www.php.net/runkit required');
}
diff --git a/_test/cases/lib/exe/js_js_compress.test.php b/_test/cases/lib/exe/js_js_compress.test.php
index b7de9257d..9051dfb01 100644
--- a/_test/cases/lib/exe/js_js_compress.test.php
+++ b/_test/cases/lib/exe/js_js_compress.test.php
@@ -71,7 +71,7 @@ class js_js_compress_test extends UnitTestCase {
function test_dquotrunaway(){
$text = 'var foo="Now where does it end';
- $this->assertEqual(js_compress($text), "$text");
+ $this->assertEqual(js_compress($text), $text);
}
function test_squot1(){
@@ -81,7 +81,7 @@ class js_js_compress_test extends UnitTestCase {
function test_squotrunaway(){
$text = "var foo='Now where does it end";
- $this->assertEqual(js_compress($text), "$text");
+ $this->assertEqual(js_compress($text), $text);
}
function test_nl1(){
diff --git a/_test/lib/testmanager.php b/_test/lib/testmanager.php
index def86ca27..14cc20bf3 100644
--- a/_test/lib/testmanager.php
+++ b/_test/lib/testmanager.php
@@ -7,7 +7,7 @@ define('TEST_GROUPS',realpath(dirname(__FILE__).'/../cases'));
define('TEST_CASES',realpath(dirname(__FILE__).'/../cases'));
// try to load runkit extension
-if (!extension_loaded('runkit')) {
+if (!extension_loaded('runkit') && function_exists('dl')) {
if (strtoupper(substr(PHP_OS, 0, 3) == 'WIN')) {
@dl('php_runkit.dll');
} else {
@@ -15,7 +15,6 @@ if (!extension_loaded('runkit')) {
}
}
-
class TestManager {
var $_testcase_extension = '.test.php';
var $_grouptest_extension = '.group.php';