From c8ff440095cbd65ad967a8515cd9dcd00cc78317 Mon Sep 17 00:00:00 2001 From: Felix De Vliegher Date: Mon, 15 Sep 2008 08:42:48 +0000 Subject: [PATCH] More fileinfo tests --- ext/fileinfo/tests/finfo_close_error.phpt | 45 +++++++++++++++++++++ ext/fileinfo/tests/finfo_phpinfo_basic.phpt | 19 +++++++++ 2 files changed, 64 insertions(+) create mode 100644 ext/fileinfo/tests/finfo_close_error.phpt create mode 100644 ext/fileinfo/tests/finfo_phpinfo_basic.phpt diff --git a/ext/fileinfo/tests/finfo_close_error.phpt b/ext/fileinfo/tests/finfo_close_error.phpt new file mode 100644 index 0000000000..0294a250d5 --- /dev/null +++ b/ext/fileinfo/tests/finfo_close_error.phpt @@ -0,0 +1,45 @@ +--TEST-- +Test finfo_close() function : error conditions +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing finfo_close() : error conditions *** + +-- Testing finfo_close() function with Zero arguments -- + +Warning: finfo_close() expects exactly 1 parameter, 0 given in %s on line %d +bool(false) + +-- Testing finfo_close() function with more than expected no. of arguments -- + +Warning: finfo_close() expects exactly 1 parameter, 2 given in %s on line %d +bool(false) + +-- Testing finfo_close() function with wrong resource type -- + +Warning: finfo_close(): supplied resource is not a valid file_info resource in %s on line %d +bool(false) +===DONE=== diff --git a/ext/fileinfo/tests/finfo_phpinfo_basic.phpt b/ext/fileinfo/tests/finfo_phpinfo_basic.phpt new file mode 100644 index 0000000000..9f1c2cc14d --- /dev/null +++ b/ext/fileinfo/tests/finfo_phpinfo_basic.phpt @@ -0,0 +1,19 @@ +--TEST-- +Test finfo extention : loading into phpinfo() +--FILE-- + enabled/", $output)); + +?> +===DONE=== +--EXPECTF-- +*** Testing finfo extension : loading info phpinfo() *** +int(1) +===DONE=== -- 2.50.1