summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMelvyn Sopacua <msopacua@php.net>2002-10-23 19:52:26 +0000
committerMelvyn Sopacua <msopacua@php.net>2002-10-23 19:52:26 +0000
commitd365b09ec3c2bc114ee523cfc32f11620be4d4b1 (patch)
treed118296004419ed7e5014119705f976ba7e1d800
parentafa9f42f47574082f42161c5ade3956c92387a1c (diff)
downloadphp-git-d365b09ec3c2bc114ee523cfc32f11620be4d4b1.tar.gz
Make it work without .php files
-rw-r--r--ext/xslt/tests/003.phpt24
-rw-r--r--ext/xslt/tests/xslt_set_error_handler.php25
2 files changed, 23 insertions, 26 deletions
diff --git a/ext/xslt/tests/003.phpt b/ext/xslt/tests/003.phpt
index 5663b44503..a85dd0674e 100644
--- a/ext/xslt/tests/003.phpt
+++ b/ext/xslt/tests/003.phpt
@@ -4,7 +4,29 @@ Pass object for xslt_error_handler, bug #17931
<?php include("skipif.inc"); ?>
--FILE--
<?php
-include('xslt_set_error_handler.php');
+class xsl {
+
+ function xsl() {
+ $this->_parser = xslt_create();
+ }
+
+ function set_error() {
+ xslt_set_error_handler($this->_parser, array($this, 'xslt_trap_error'));
+ echo "OK";
+ }
+
+ function xslt_trap_error($parser, $errorno, $level, $fields) {
+ return TRUE;
+ }
+ function clean() {
+ xslt_free($this->_parser);
+ }
+}
+
+$x = new xsl;
+// work-around for possible '$this does not exist' bug in constructor
+$x->set_error();
+$x->clean();
?>
--EXPECT--
OK
diff --git a/ext/xslt/tests/xslt_set_error_handler.php b/ext/xslt/tests/xslt_set_error_handler.php
deleted file mode 100644
index f0a03a81b2..0000000000
--- a/ext/xslt/tests/xslt_set_error_handler.php
+++ /dev/null
@@ -1,25 +0,0 @@
-<?php
-class xsl {
-
- function xsl() {
- $this->_parser = xslt_create();
- }
-
- function set_error() {
- xslt_set_error_handler($this->_parser, array($this, 'xslt_trap_error'));
- echo "OK";
- }
-
- function xslt_trap_error($parser, $errorno, $level, $fields) {
- return TRUE;
- }
- function clean() {
- xslt_free($this->_parser);
- }
-}
-
-$x = new xsl;
-// work-around for possible '$this does not exist' bug in constructor
-$x->set_error();
-$x->clean();
-?>