From dbc6c32152c4726564ad161d7c4c9d03123e1eeb Mon Sep 17 00:00:00 2001 From: Melvyn Sopacua Date: Fri, 25 Oct 2002 19:13:34 +0000 Subject: [PATCH] test renaming --- ext/xslt/tests/001.phpt | 12 ------ ext/xslt/tests/002.phpt | 15 ------- ext/xslt/tests/003.phpt | 32 --------------- ext/xslt/tests/004.phpt | 20 ---------- ext/xslt/tests/005.phpt | 60 ---------------------------- ext/xslt/tests/006.phpt | 74 ----------------------------------- ext/xslt/tests/007.phpt | 47 ---------------------- ext/xslt/tests/008.phpt | 87 ----------------------------------------- ext/xslt/tests/009.phpt | 21 ---------- 9 files changed, 368 deletions(-) delete mode 100644 ext/xslt/tests/001.phpt delete mode 100644 ext/xslt/tests/002.phpt delete mode 100644 ext/xslt/tests/003.phpt delete mode 100644 ext/xslt/tests/004.phpt delete mode 100644 ext/xslt/tests/005.phpt delete mode 100644 ext/xslt/tests/006.phpt delete mode 100644 ext/xslt/tests/007.phpt delete mode 100644 ext/xslt/tests/008.phpt delete mode 100644 ext/xslt/tests/009.phpt diff --git a/ext/xslt/tests/001.phpt b/ext/xslt/tests/001.phpt deleted file mode 100644 index 3270c3f20e..0000000000 --- a/ext/xslt/tests/001.phpt +++ /dev/null @@ -1,12 +0,0 @@ ---TEST-- -Check for xslt presence ---SKIPIF-- - ---POST-- ---GET-- ---FILE-- - ---EXPECT-- -xslt extension is available \ No newline at end of file diff --git a/ext/xslt/tests/002.phpt b/ext/xslt/tests/002.phpt deleted file mode 100644 index 0a9446e1b0..0000000000 --- a/ext/xslt/tests/002.phpt +++ /dev/null @@ -1,15 +0,0 @@ ---TEST-- -Pass long string to 'file' argument, bug #17791 ---SKIPIF-- - ---FILE-- - ---EXPECT-- -OK diff --git a/ext/xslt/tests/003.phpt b/ext/xslt/tests/003.phpt deleted file mode 100644 index a85dd0674e..0000000000 --- a/ext/xslt/tests/003.phpt +++ /dev/null @@ -1,32 +0,0 @@ ---TEST-- -Pass object for xslt_error_handler, bug #17931 ---SKIPIF-- - ---FILE-- -_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/004.phpt b/ext/xslt/tests/004.phpt deleted file mode 100644 index c8b7b236f2..0000000000 --- a/ext/xslt/tests/004.phpt +++ /dev/null @@ -1,20 +0,0 @@ ---TEST-- -Set a non-existing scheme handler ---SKIPIF-- - ---FILE-- -'; -$xslstring = ''; -xslt_set_scheme_handlers($xh, array('get_all' => 'foo')); -$result = xslt_process($xh, 'arg:/_xml', 'arg:/_xsl', NULL, array('/_xml' => $xmlstring, '/_xsl' => $xslstring)); -xslt_free($xh); -echo("OK"); -?> ---EXPECT-- -OK diff --git a/ext/xslt/tests/005.phpt b/ext/xslt/tests/005.phpt deleted file mode 100644 index 935c7c273d..0000000000 --- a/ext/xslt/tests/005.phpt +++ /dev/null @@ -1,60 +0,0 @@ ---TEST-- -Various ways to provide xml and xslt arguments and params ---SKIPIF-- - ---FILE-- - $xmldata)); -print "$result\n"; -$result = xslt_process($xh, $xmlfile, 'arg:/_xsl', NULL, array('/_xsl' => $xslsheet)); -print "$result\n"; -$result = xslt_process($xh, 'arg:/_xml', 'arg:/_xsl', NULL, array('/_xml' => $xmldata, '/_xsl' => $xslsheet)); -print "$result\n"; - -// The same, with params -$xslfile = 'ext/xslt/tests/param.xsl'; -$xslsheet = implode('', file($xslfile)); -$params = array("Test has passed", "PHP QA®"); - -foreach($params AS $val) -{ - $val = utf8_encode($val); - $result = xslt_process($xh, $xmlfile, $xslfile, NULL, NULL, array('insertion' => $val)); - print "$result\n"; - $result = xslt_process($xh, 'arg:/_xml', $xslfile, NULL, array('/_xml' => $xmldata), array('insertion' => $val)); - print "$result\n"; - $result = xslt_process($xh, $xmlfile, 'arg:/_xsl', NULL, array('/_xsl' => $xslsheet), array('insertion' => $val)); - print "$result\n"; - $result = xslt_process($xh, 'arg:/_xml', 'arg:/_xsl', NULL, array('/_xml' => $xmldata, '/_xsl' => $xslsheet), array('insertion' => $val)); - print "$result\n"; -} - -xslt_free($xh); -?> ---EXPECT-- -Test has passed -Test has passed -Test has passed -Test has passed -Test has passed -Test has passed -Test has passed -Test has passed -PHP QA® -PHP QA® -PHP QA® -PHP QA® diff --git a/ext/xslt/tests/006.phpt b/ext/xslt/tests/006.phpt deleted file mode 100644 index 7c6f14fa45..0000000000 --- a/ext/xslt/tests/006.phpt +++ /dev/null @@ -1,74 +0,0 @@ ---TEST-- -Crash xslt_process with reused handler (this test may take a while) ---SKIPIF-- - ---FILE-- - $val)); - if(!$result or $result != utf8_decode($val)) - print "Failed $i / ".utf8_decode($val).": $result\n\tDecode: " . decode(utf8_decode($val)) . "\n" ; -} -print "OK\n"; -xslt_free($xh); -$t2 = time(); -$op_time = $t2 - $t1; -if($op_time > $want_time) - print "This test took more than $want_time seconds. Either you have a very slow / busy machine, or there's something very wrong with the speed. Your time: $op_time"; -?> ---EXPECT-- -OK diff --git a/ext/xslt/tests/007.phpt b/ext/xslt/tests/007.phpt deleted file mode 100644 index 3967e6723d..0000000000 --- a/ext/xslt/tests/007.phpt +++ /dev/null @@ -1,47 +0,0 @@ ---TEST-- -xslt_set_opt function and public entities ---SKIPIF-- - ---FILE-- -', 'foo

', $xslstring); -// DEBUG: print $xslstring; - -xslt_setopt($xh, XSLT_SAB_PARSE_PUBLIC_ENTITIES | XSLT_SAB_DISABLE_ADDING_META); -$result_nometa = xslt_process($xh, $xmlfile, 'arg:/_xsl', NULL, array('/_xsl' => $xslstring)); -// DEBUG: print "$result_nometa\n"; - -xslt_setopt($xh, XSLT_SAB_PARSE_PUBLIC_ENTITIES); -$result_meta = xslt_process($xh, $xmlfile, 'arg:/_xsl', NULL, array('/_xsl' => $xslstring)); -// DEBUG: print "$result_meta\n"; - -/* Also test if they're equal. That would mean, that disable-adding-meta is set to off - at compile time and our call to xslt_setopt failed to reset that */ -if($result_meta != $result_nometa && FALSE === stristr($result_nometa, ' ---EXPECT-- -PHP QA® -OK diff --git a/ext/xslt/tests/008.phpt b/ext/xslt/tests/008.phpt deleted file mode 100644 index a7e8b3d6d7..0000000000 --- a/ext/xslt/tests/008.phpt +++ /dev/null @@ -1,87 +0,0 @@ ---TEST-- -xslt_set_object function ---SKIPIF-- - ---FILE-- - 'handle_getall'); - xslt_set_scheme_handlers($xh,$handlers); - $res = xslt_process($xh,$xmlfile,$xslfile); - xslt_free($xh); - return 1; - } - - // this function will pass this object as in set_scheme_handler - function test2($xmlfile,$xslfile) - { - $xh = xslt_create(); - $handlers = array('get_all'=> array(&$this,'handle_getall2')); - xslt_set_scheme_handlers($xh,$handlers); - $res = xslt_process($xh,$xmlfile,$xslfile); - xslt_free($xh); - return 1; - } - function handle_getall($xh,$scheme,$rest) - { - $this->_success = true; - $rest = substr($rest,2); - return implode('', file('ext/xslt/tests/'.$rest)); - } - function handle_getall2($xh,$scheme,$rest) - { - $this->_success2 = true; - $rest = substr($rest,2); - return implode('', file('ext/xslt/tests/'.$rest)); - } - function testSucceeded() - { - return $this->_success; - } - function test2Succeeded() - { - return $this->_success2; - } -} - -$xmlfile = 'ext/xslt/tests/test.xml'; -$xslfile = 'ext/xslt/tests/xslt_set_object.xsl'; - -$testobj = new XSLTTester(); -$testobj->test1($xmlfile,$xslfile); - -$testobj->test2($xmlfile,$xslfile); - -if ($testobj->testSucceeded()) - print "OK\n"; -else - print "FAILED\n"; - -if ($testobj->test2Succeeded()) - print "OK\n"; -else - print "FAILED\n"; - -?> ---EXPECT-- -OK -OK diff --git a/ext/xslt/tests/009.phpt b/ext/xslt/tests/009.phpt deleted file mode 100644 index eeb1c6d769..0000000000 --- a/ext/xslt/tests/009.phpt +++ /dev/null @@ -1,21 +0,0 @@ ---TEST-- -Memoryleak in error printing ---SKIPIF-- - ---INI-- -error_reporting=2047 -display_errors=0 -track_errors=1 ---FILE-- - ---EXPECTF-- -Sablotron error on line none: cannot open file '%s/ext/xslt/tests/non-existent.xsl' -- 2.50.1