php-src/ext/dbx/tests/004.phpt
Marc Boeren 7567bf1862 Created a testset and a script to create a (mysql) database. This script
is easily modified to create other databases as well. The testset needs the
database, but it doesn't need to be a mysql database. Scripts to generate
other databases (with the same structure and data) would be appreciated.
2001-06-05 13:51:01 +00:00

30 lines
722 B
PHP

--TEST--
dbx_close
--SKIPIF--
<?php if (!extension_loaded("dbx")) print("skip"); ?>
--POST--
--GET--
--FILE--
<?php
include_once("ext/dbx/tests/dbx_test.p");
$dlo = dbx_connect($module, $host, $database, $username, $password);
if ($dlo!=0) {
if (dbx_close($dlo)) {
print('close works ok'."\n");
}
}
if (!@dbx_close($dlo)) {
print('close failure works ok'."\n");
}
if (!@dbx_close($dlo, "12many")) {
print('too many parameters: close failure works ok'."\n");
}
if (!@dbx_close()) {
print('too few parameters: close failure works ok'."\n");
}
?>
--EXPECT--
close works ok
close failure works ok
too many parameters: close failure works ok
too few parameters: close failure works ok