File: testBasic_raiseError.phpt

package info (click to toggle)
php-pear 1%3A1.10.1%2Bsubmodules%2Bnotgz-9%2Bdeb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 18,600 kB
  • sloc: php: 51,665; ansic: 38,629; xml: 32,572; yacc: 677; pascal: 452; makefile: 122; sh: 116
file content (19 lines) | stat: -rw-r--r-- 502 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--TEST--
XML_Util::raiseError() basic tests
--CREDITS--
Chuck Burgess <ashnazg@php.net>
# created for v1.2.0a1 2008-05-04
--FILE--
<?php
require_once 'XML' . DIRECTORY_SEPARATOR . 'Util.php';
echo '=====XML_Util::raiseError() basic tests=====' . PHP_EOL . PHP_EOL;

$error = XML_Util::raiseError("I am an error", 12345);
if (is_a($error, 'PEAR_Error')) {
    print "PEAR Error: " . $error->getMessage() . PHP_EOL;
}
?>
--EXPECT--
=====XML_Util::raiseError() basic tests=====

PEAR Error: I am an error