示例#1
0
文件: FileTest.php 项目: naucon/file
 /**
  * @return    void
  */
 public function testGetFilename()
 {
     $fileObject = new File('example.txt');
     $this->assertEquals('example.txt', $fileObject->getFilename());
     $fileObject = new File('image.jpeg');
     $this->assertEquals('image.jpeg', $fileObject->getFilename());
     $fileObject = new File('.htaccess');
     $this->assertEquals('.htaccess', $fileObject->getFilename());
     $fileObject = new File('/tmp');
     $this->assertEquals('/tmp', $fileObject->getFilename());
     $fileObject = new \SplFileInfo('example.txt');
     $this->assertEquals('example.txt', $fileObject->getFilename());
     $fileObject = new \SplFileInfo('image.jpeg');
     $this->assertEquals('image.jpeg', $fileObject->getFilename());
     $fileObject = new \SplFileInfo('.htaccess');
     $this->assertEquals('.htaccess', $fileObject->getFilename());
     $fileObject = new \SplFileInfo('/tmp');
     $this->assertEquals('/tmp', $fileObject->getFilename());
 }