Annotation of embedaddon/php/ext/interbase/tests/ibase_drop_db_001.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: ibase_drop_db(): Basic test
3: --SKIPIF--
4: <?php include("skipif.inc"); ?>
5: --FILE--
6: <?php
7:
8: require("interbase.inc");
9:
10: unlink($file = tempnam('/tmp',"php_ibase_test"));
11:
12:
13: $db = ibase_query(IBASE_CREATE,
14: sprintf("CREATE SCHEMA '%s' USER '%s' PASSWORD '%s' DEFAULT CHARACTER SET %s",$file,
15: $user, $password, ($charset = ini_get('ibase.default_charset')) ? $charset : 'NONE'));
16:
17: var_dump($db);
18: var_dump(ibase_drop_db($db));
19: var_dump(ibase_drop_db(1));
20: var_dump(ibase_drop_db(NULL));
21:
22: ?>
23: --EXPECTF--
24: resource(%d) of type (Firebird/InterBase link)
25: bool(true)
26:
27: Warning: ibase_drop_db() expects parameter 1 to be resource, integer given in %s on line %d
28: NULL
29:
30: Warning: ibase_drop_db() expects parameter 1 to be resource, null given in %s on line %d
31: NULL
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>