mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
Import from DCARF SVN
This commit is contained in:
26
include/pear/tests/004.phpt
Normal file
26
include/pear/tests/004.phpt
Normal file
@@ -0,0 +1,26 @@
|
||||
--TEST--
|
||||
XML Parser: error class
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("xml")) echo 'skip'; ?>
|
||||
--FILE--
|
||||
<?php // -*- C++ -*-
|
||||
//
|
||||
// Test for: XML/Parser.php
|
||||
// Parts tested: - parser error class
|
||||
//
|
||||
|
||||
require_once "../Parser.php";
|
||||
|
||||
print "new XML_Parser ";
|
||||
var_dump(get_class($p = new XML_Parser()));
|
||||
$e = $p->parseString("<?xml version='1.0' ?><foo></bar>", true);
|
||||
if (PEAR::isError($e)) {
|
||||
printf("error message: %s\n", $e->getMessage());
|
||||
} else {
|
||||
print "no error\n";
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
new XML_Parser string(10) "xml_parser"
|
||||
error message: XML_Parser: mismatched tag at XML input line 1
|
||||
Reference in New Issue
Block a user