From 02050bc6f5c45ae71ea81690c1623033e024be52 Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Tue, 11 Nov 2008 17:54:11 +0000 Subject: [PATCH] - New tests --- ext/interbase/tests/ibase_close_001.phpt | 25 +++++++++++ ext/interbase/tests/ibase_drop_db_001.phpt | 31 ++++++++++++++ ext/interbase/tests/ibase_num_fields_001.phpt | 25 +++++++++++ ext/interbase/tests/ibase_rollback_001.phpt | 41 +++++++++++++++++++ 4 files changed, 122 insertions(+) create mode 100644 ext/interbase/tests/ibase_close_001.phpt create mode 100644 ext/interbase/tests/ibase_drop_db_001.phpt create mode 100644 ext/interbase/tests/ibase_num_fields_001.phpt create mode 100644 ext/interbase/tests/ibase_rollback_001.phpt diff --git a/ext/interbase/tests/ibase_close_001.phpt b/ext/interbase/tests/ibase_close_001.phpt new file mode 100644 index 00000000000..6e31916abe5 --- /dev/null +++ b/ext/interbase/tests/ibase_close_001.phpt @@ -0,0 +1,25 @@ +--TEST-- +ibase_close(): Basic test +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +bool(true) +bool(true) + +Warning: ibase_close(): %d is not a valid Firebird/InterBase link resource in %s on line %d +bool(false) + +Warning: ibase_close() expects parameter 1 to be resource,%string given in %s on line %d +NULL diff --git a/ext/interbase/tests/ibase_drop_db_001.phpt b/ext/interbase/tests/ibase_drop_db_001.phpt new file mode 100644 index 00000000000..7526e13144e --- /dev/null +++ b/ext/interbase/tests/ibase_drop_db_001.phpt @@ -0,0 +1,31 @@ +--TEST-- +ibase_drop_db(): Basic test +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +resource(%d) of type (Firebird/InterBase link) +bool(true) + +Warning: ibase_drop_db() expects parameter 1 to be resource, integer given in %s on line %d +NULL + +Warning: ibase_drop_db() expects parameter 1 to be resource, null given in %s on line %d +NULL diff --git a/ext/interbase/tests/ibase_num_fields_001.phpt b/ext/interbase/tests/ibase_num_fields_001.phpt new file mode 100644 index 00000000000..510b0f6f58d --- /dev/null +++ b/ext/interbase/tests/ibase_num_fields_001.phpt @@ -0,0 +1,25 @@ +--TEST-- +ibase_num_fields(): Basic test +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +int(2) + +Warning: ibase_num_fields(): supplied argument is not a valid Firebird/InterBase result resource in %s on line %d +bool(false) + +Warning: Wrong parameter count for ibase_num_fields() in %s on line %d +NULL diff --git a/ext/interbase/tests/ibase_rollback_001.phpt b/ext/interbase/tests/ibase_rollback_001.phpt new file mode 100644 index 00000000000..3cde5e9d46e --- /dev/null +++ b/ext/interbase/tests/ibase_rollback_001.phpt @@ -0,0 +1,41 @@ +--TEST-- +ibase_rollback(): Basic test +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +array(1) { + [0]=> + int(3) +} +bool(true) +array(1) { + [0]=> + int(0) +} +bool(true) + +Warning: ibase_rollback(): invalid transaction handle (expecting explicit transaction start) in %s on line %d +bool(false)