summaryrefslogtreecommitdiff
path: root/tests/lang
diff options
context:
space:
mode:
authorAlan Knowles <alan_k@php.net>2004-07-13 07:12:06 +0000
committerAlan Knowles <alan_k@php.net>2004-07-13 07:12:06 +0000
commitad2b89c9a3696d0a52bf1e1fd01e9d0c682e0bc5 (patch)
treea2d783ee050b416e86884b9f1da7204de95d938f /tests/lang
parent196259d3348e6c1f6622e5bc316207fc79f92ec9 (diff)
downloadphp-git-ad2b89c9a3696d0a52bf1e1fd01e9d0c682e0bc5.tar.gz
ensure that test passes on systems without postgres built in.
Diffstat (limited to 'tests/lang')
-rwxr-xr-xtests/lang/038.phpt8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/lang/038.phpt b/tests/lang/038.phpt
index b00728aef1..32a7399a49 100755
--- a/tests/lang/038.phpt
+++ b/tests/lang/038.phpt
@@ -5,7 +5,7 @@ Convert wanrings to exceptions
class MyException extends Exception
{
- function __construct($errstr, $errno, $errfile, $errline)
+ function __construct($errstr, $errno=0, $errfile='', $errline='')
{
parent::__construct($errstr, $errno);
$this->file = $errfile;
@@ -15,7 +15,7 @@ class MyException extends Exception
function Error2Exception($errno, $errstr, $errfile, $errline)
{
- throw new ErrorException($errstr, $errno);//, $errfile, $errline);
+ throw new MyException($errstr, $errno);//, $errfile, $errline);
}
$err_msg = 'no exception';
@@ -23,7 +23,7 @@ set_error_handler('Error2Exception');
try
{
- $con = pg_connect('host=localhost dbname=xtest');
+ $con = fopen("/tmp/a_file_that_does_not_exist",'r');
}
catch (Exception $e)
{
@@ -37,5 +37,5 @@ catch (Exception $e)
<?php exit(0); ?>
--EXPECTF--
string(15) "Error2Exception"
-string(10) "pg_connect"
+string(5) "fopen"
===DONE===