Files
archived-pecl-database-ibm-db2/tests/test_090_ConnmsgWrongDbAlias.phpt
Kevin Adler caacad32d9 Fix failing test cases
Mostly involved finding resources relative to the script directory
instead of from the current directory, which make test sets as the
source directory. Instead of writing a file and then reading it
back in to compare, just build up a string in memory and compare
them.

Connecting to a missing db alias returns an empty SQLSTATE. I'm
not sure if/when that changed, but I've adjusted the code to
handle either case.

Finally, escape.dat was missing a \r in the file.
2019-04-16 12:40:41 +05:30

23 lines
355 B
PHP

--TEST--
IBM-DB2: db2_conn_errormsg() - wrong database alias
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
require_once('connection.inc');
$conn = @db2_connect("x", $user, $password);
if ($conn) {
echo "??? No way.\n";
}
else {
$err = db2_conn_errormsg();
echo $err."\n";
}
?>
--EXPECTF--
[IBM][CLI Driver] %s SQLCODE=-%d