1--TEST--
2Test is_dir() function: error conditions
3--FILE--
4<?php
5/* Prototype: bool is_dir ( string $filename );
6 *  Description: Tells whether the filename is a regular file
7 *               Returns TRUE if the filename exists and is a regular file
8 */
9
10echo "*** Testing is_dir() error conditions ***";
11var_dump( is_dir() );  // Zero No. of args
12
13$dir_name = dirname(__FILE__)."/is_dir_error";
14mkdir($dir_name);
15var_dump( is_dir($dir_name, "is_dir_error1") ); // args > expected no.of args
16
17/* Non-existing dir */
18var_dump( is_dir("/no/such/dir") );
19
20echo "*** Done ***";
21?>
22
23--CLEAN--
24<?php
25rmdir(dirname(__FILE__)."/is_dir_error");
26?>
27--EXPECTF--
28*** Testing is_dir() error conditions ***
29Warning: is_dir() expects exactly 1 parameter, 0 given in %s on line %d
30NULL
31
32Warning: is_dir() expects exactly 1 parameter, 2 given in %s on line %d
33NULL
34bool(false)
35*** Done ***
36