예제 #1
0
파일: FileTest.php 프로젝트: naucon/file
 /**
  * @depends     testDeleteFiles
  * @return      void
  */
 public function testDeleteAllFiles()
 {
     $filePath = __DIR__ . '/tmp/foo2';
     $fileObject = new File($filePath);
     $this->assertTrue($fileObject->isDir());
     $this->assertTrue($fileObject->isWritable());
     $this->assertTrue($fileObject->deleteAllFiles());
     $subPaths = array_diff(scandir($filePath . '/bar2'), array('..', '.'));
     $this->assertEquals(0, count($subPaths));
     $subPaths = array_diff(scandir($filePath . '/bar3'), array('..', '.'));
     $this->assertEquals(0, count($subPaths));
 }