getBasename() public method

Returns base name of file without extension (or base name of directory).
public getBasename ( string $suffix = null ) : string
$suffix string
return string
Exemplo n.º 1
0
 public function testGetBasename()
 {
     $fileInfo = new FileInfo(__FILE__);
     $filename = $fileInfo->getFilename();
     $basename = trim($filename, '.' . $fileInfo->getExtension());
     $this->assertEquals($basename, $fileInfo->getBasename());
 }