From: Raghubansh Kumar Date: Sat, 21 Jul 2007 17:31:42 +0000 (+0000) Subject: New testcases for is_dir() function X-Git-Tag: php-5.2.4RC1~99 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7cefd7792c4356f08273429f73a8da6a5f93cb01;p=php New testcases for is_dir() function --- diff --git a/ext/standard/tests/file/is_dir_variation1.phpt b/ext/standard/tests/file/is_dir_variation1.phpt new file mode 100644 index 0000000000..4f85ba93bb --- /dev/null +++ b/ext/standard/tests/file/is_dir_variation1.phpt @@ -0,0 +1,43 @@ +--TEST-- +Test is_dir() function: usage variations - dir/subdir +--FILE-- + +--CLEAN-- + +--EXPECTF-- +-- Testing is_dir() with an empty dir -- +bool(true) +-- Testing is_dir() with a subdir in base dir -- +bool(true) +bool(true) + +*** Done *** diff --git a/ext/standard/tests/file/is_dir_variation2.phpt b/ext/standard/tests/file/is_dir_variation2.phpt new file mode 100644 index 0000000000..df2464d3c2 --- /dev/null +++ b/ext/standard/tests/file/is_dir_variation2.phpt @@ -0,0 +1,84 @@ +--TEST-- +Test is_dir() function: usage variations - links +--SKIPIF-- + +--CLEAN-- + +--EXPECTF-- +*** Testing is_dir() with dir and links to dir *** +-- With dir -- +bool(true) +-- With symlink -- +bool(true) +-- With hardlink -- +Warning: link(): Operation not permitted in %s on line %d +bool(false) + +*** Testing is_dir() with file and links to a file *** +-- With file -- +bool(false) +-- With symlink -- +bool(false) +-- With hardlink -- +bool(false) + +*** Done *** diff --git a/ext/standard/tests/file/is_dir_variation3.phpt b/ext/standard/tests/file/is_dir_variation3.phpt new file mode 100644 index 0000000000..c9b20420c7 --- /dev/null +++ b/ext/standard/tests/file/is_dir_variation3.phpt @@ -0,0 +1,46 @@ +--TEST-- +Test is_dir() function: usage variations - invalid arguments +--FILE-- + +--EXPECTF-- +*** Testing is_dir() with Invalid arguments: expected bool(false) *** +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) + +*** Done *** diff --git a/ext/standard/tests/file/is_dir_variation4.phpt b/ext/standard/tests/file/is_dir_variation4.phpt new file mode 100644 index 0000000000..a68fe0b005 --- /dev/null +++ b/ext/standard/tests/file/is_dir_variation4.phpt @@ -0,0 +1,85 @@ +--TEST-- +Test is_dir() function: usage variations - diff. path notations +--FILE-- + +--CLEAN-- + +--EXPECTF-- +*** Testing is_dir() with different notations of dir names *** +-- Iteration 1 -- +bool(true) + +-- Iteration 2 -- +bool(true) + +-- Iteration 3 -- +bool(true) + +-- Iteration 4 -- +bool(true) + +-- Iteration 5 -- +bool(true) + +-- Iteration 6 -- +bool(true) + +-- Iteration 7 -- +bool(true) + +-- Iteration 8 -- +bool(false) + +-- Iteration 9 -- +bool(true) + +-- Iteration 10 -- +bool(true) + +*** Done ***