summaryrefslogtreecommitdiff
path: root/pear/tests/pear_error2.phpt
blob: 9dbfa3b22c6afc190e2bc6606d1a5b7968f5b802 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
--TEST--
PEAR_Error: die mode
--SKIPIF--
<?php
if (!getenv('PHP_PEAR_RUNTESTS')) {
    echo 'skip';
}
?>
--FILE--
<?php // -*- C++ -*-

// Test for: PEAR.php
// Parts tested: - PEAR_Error class
//               - PEAR::isError static method
// testing PEAR_Error

include_once "PEAR.php";

error_reporting(E_ALL);

print "mode=die: ";
$err = new PEAR_Error("test error!!\n", -42, PEAR_ERROR_DIE);
print $err->toString() . "\n";

?>
--EXPECT--
mode=die: test error!!