summaryrefslogtreecommitdiff
path: root/ext/standard/tests/dir/getcwd_error.phpt
blob: 1fcfa47a9d93fb1c4f26b37259a050ce9f1848bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--TEST--
Test getcwd() function : error conditions - Incorrect number of arguments
--FILE--
<?php
/* Prototype  : mixed getcwd(void)
 * Description: Gets the current directory
 * Source code: ext/standard/dir.c
 */

/*
 * Pass incorrect number of arguments to getcwd() to test behaviour
 */

echo "*** Testing getcwd() : error conditions ***\n";

// One argument
echo "\n-- Testing getcwd() function with one argument --\n";
$extra_arg = 10;
var_dump( getcwd($extra_arg) );
?>
===DONE===
--EXPECTF--
*** Testing getcwd() : error conditions ***

-- Testing getcwd() function with one argument --

Warning: getcwd() expects exactly 0 parameters, 1 given in %s on line %d
NULL
===DONE===