1--TEST--
2Test dirname() function : error conditions
3--FILE--
4<?php
5echo "*** Testing error conditions ***\n";
6
7// Bad arg
8try {
9    dirname("/var/tmp/bar.gz", 0);
10} catch (\ValueError $e) {
11    echo $e->getMessage() . "\n";
12}
13
14?>
15--EXPECT--
16*** Testing error conditions ***
17dirname(): Argument #2 ($levels) must be greater than or equal to 1
18