From 4c3b61356b9fe001c5637c30f6105a208f4dffc3 Mon Sep 17 00:00:00 2001
From: Christian Schneider
Date: Sun, 15 Jul 2007 14:26:40 +0000
Subject: Make itools tests work under PHP4 and PHP5
---
tests/xml.t | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
(limited to 'tests/xml.t')
diff --git a/tests/xml.t b/tests/xml.t
index 8e72a77..5d652cc 100755
--- a/tests/xml.t
+++ b/tests/xml.t
@@ -12,7 +12,7 @@ function match($xmldata, $expected, $name, $prefix = "")
$xml = new $classname("$xmldata");
is(
- preg_replace('/[#\s]+/', " ", search_test::dump($xml->$varname)),
+ preg_replace('/[#\s]+/', " ", print_r($xml->$varname, true)),
$expected,
$name,
);
@@ -20,25 +20,25 @@ function match($xmldata, $expected, $name, $prefix = "")
match(
'',
- 'class foo { }',
+ 'foo Object ( ) ',
'empty tag'
);
match(
'',
- 'array ( 0 => class foo { }, 1 => class foo { }, )',
+ 'Array ( [0] => foo Object ( ) [1] => foo Object ( ) ) ',
'multiple empty tags converted to array'
);
match(
'Stüssihofstadt',
- 'class foo { var $attr = array( \'title\' => \'Zürich\' ); var $val = \'Stüssihofstadt\'; }',
+ 'foo Object ( [attr] => Array ( [title] => Zürich ) [val] => Stüssihofstadt ) ',
'simple tag with latin1 content and attribute'
);
match(
'',
- 'class foo { var $a_b__c = class a_b__c { var $attr = array( \'d_e_f\' => \'value\' ); }; }',
+ 'foo Object ( [a_b__c] => a_b__c Object ( [attr] => Array ( [d_e_f] => value ) ) ) ',
'Tags and attributes with name space and special characters'
);
@@ -62,7 +62,7 @@ function my_xml($xmldata)
match(
'',
- 'class myfoo { var $inheritbaseclass = false; }',
+ 'myfoo Object ( [inheritbaseclass] => ) ',
'Inheritance and constructor (critical for e.g. tel_xmlentry)',
'my'
);
--
cgit v1.2.3