From 8c22747b68692b99787b498d3e40375ec924c043 Mon Sep 17 00:00:00 2001 From: Felix De Vliegher Date: Thu, 26 Jun 2008 09:12:40 +0000 Subject: [PATCH] MFB: tests for lchown(), testfest.php.net task number 129. --- ext/standard/tests/file/lchown_basic.phpt | 43 ++++++++++++++ ext/standard/tests/file/lchown_error.phpt | 68 +++++++++++++++++++++++ 2 files changed, 111 insertions(+) create mode 100644 ext/standard/tests/file/lchown_basic.phpt create mode 100644 ext/standard/tests/file/lchown_error.phpt diff --git a/ext/standard/tests/file/lchown_basic.phpt b/ext/standard/tests/file/lchown_basic.phpt new file mode 100644 index 0000000000..0b7edb6fde --- /dev/null +++ b/ext/standard/tests/file/lchown_basic.phpt @@ -0,0 +1,43 @@ +--TEST-- +Test lchown() function : basic functionality +--SKIPIF-- + +--FILE-- + +===DONE=== +--CLEAN-- + +--EXPECTF-- +*** Testing lchown() : basic functionality *** +bool(true) +bool(true) +bool(true) +bool(true) +===DONE=== diff --git a/ext/standard/tests/file/lchown_error.phpt b/ext/standard/tests/file/lchown_error.phpt new file mode 100644 index 0000000000..879da0a99f --- /dev/null +++ b/ext/standard/tests/file/lchown_error.phpt @@ -0,0 +1,68 @@ +--TEST-- +Test lchown() function : error functionality +--SKIPIF-- + +--FILE-- + +===DONE=== +--CLEAN-- + +--EXPECTF-- +*** Testing lchown() : error functionality *** + +Warning: lchown() expects exactly 2 parameters, 1 given in %s on line %d +bool(true) + +Warning: lchown() expects exactly 2 parameters, 3 given in %s on line %d +bool(true) + +Warning: lchown(): No such file or directory in %s on line %d +bool(false) + +Warning: lchown() expects parameter 1 to be string (Unicode or binary), object given in %s on line %d +bool(true) + +Warning: lchown() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d +bool(true) + +Warning: lchown(): Operation not permitted in %s on line %d +bool(false) +===DONE=== -- 2.50.1