1--TEST--
2DirectoryIterator::getBasename() - Pass unexpected array
3--CREDITS--
4PHPNW Testfest 2009 - Adrian Hardy
5--FILE--
6<?php
7   $targetDir = __DIR__.DIRECTORY_SEPARATOR.md5('directoryIterator::getbasename2');
8   mkdir($targetDir);
9   touch($targetDir.DIRECTORY_SEPARATOR.'getBasename_test.txt');
10   $dir = new DirectoryIterator($targetDir.DIRECTORY_SEPARATOR);
11   while(!$dir->isFile()) {
12      $dir->next();
13   }
14   echo $dir->getBasename(array());
15?>
16--CLEAN--
17<?php
18   $targetDir = __DIR__.DIRECTORY_SEPARATOR.md5('directoryIterator::getbasename2');
19   unlink($targetDir.DIRECTORY_SEPARATOR.'getBasename_test.txt');
20   rmdir($targetDir);
21?>
22--EXPECTF--
23Warning: DirectoryIterator::getBasename() expects parameter 1 to be %binary_string_optional%, array given in %s on line %d
24