1--TEST-- 2DirectoryIterator::getBasename() - Basic Test 3--CREDITS-- 4PHPNW Testfest 2009 - Adrian Hardy 5--FILE-- 6<?php 7 $targetDir = __DIR__.DIRECTORY_SEPARATOR.md5('directoryIterator::getbasename1'); 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('.txt'); 15?> 16--CLEAN-- 17<?php 18 $targetDir = __DIR__.DIRECTORY_SEPARATOR.md5('directoryIterator::getbasename1'); 19 unlink($targetDir.DIRECTORY_SEPARATOR.'getBasename_test.txt'); 20 rmdir($targetDir); 21?> 22--EXPECTF-- 23getBasename_test 24