1--TEST--
2Test is_writable() and its alias is_writeable() function: error conditions
3--FILE--
4<?php
5/* Prototype: bool is_writable ( string $filename );
6   Description: Tells whether the filename is writable.
7
8   is_writeable() is an alias of is_writable()
9*/
10
11echo "*** Testing is_writable(): error conditions ***\n";
12var_dump( is_writable() );  // args < expected
13var_dump( is_writeable() );
14
15echo "\n*** Testing is_writeable(): error conditions ***\n";
16var_dump( is_writable(1, 2) );  // args > expected
17var_dump( is_writeable(1, 2) );
18
19echo "\n*** Testing is_writable() on non-existent file ***\n";
20var_dump( is_writable(dirname(__FILE__)."/is_writable") );
21var_dump( is_writeable(dirname(__FILE__)."/is_writable") );
22
23echo "Done\n";
24?>
25--EXPECTF--
26*** Testing is_writable(): error conditions ***
27
28Warning: is_writable() expects exactly 1 parameter, 0 given in %s on line %d
29NULL
30
31Warning: is_writeable() expects exactly 1 parameter, 0 given in %s on line %d
32NULL
33
34*** Testing is_writeable(): error conditions ***
35
36Warning: is_writable() expects exactly 1 parameter, 2 given in %s on line %d
37NULL
38
39Warning: is_writeable() expects exactly 1 parameter, 2 given in %s on line %d
40NULL
41
42*** Testing is_writable() on non-existent file ***
43bool(false)
44bool(false)
45Done
46