Ejemplo n.º 1
0
 protected function tearDown()
 {
     DeleteDirectory::recursive($this->path);
     parent::tearDown();
 }
Ejemplo n.º 2
0
 public function tearDown()
 {
     DeleteDirectory::recursive($this->directory);
 }
Ejemplo n.º 3
0
 /**
  * @test
  */
 public function shouldGetFilesRecursivelyByExtension()
 {
     //given
     $dirPath = Path::joinWithTemp('test', 'tests_find_files', 'new_dir', 'second_new_dir');
     mkdir($dirPath, 0777, true);
     $file1 = Path::joinWithTemp('test', 'tests_find_files', 'file1a.phtml');
     touch($file1);
     $file2 = Path::joinWithTemp('test', 'tests_find_files', 'new_dir', 'file2a.phtml');
     touch($file2);
     $file3 = Path::joinWithTemp('test', 'tests_find_files', 'new_dir', 'second_new_dir', 'file3a.phtml');
     touch($file3);
     //when
     $files = Files::getFilesRecursivelyWithSpecifiedExtension(Path::joinWithTemp('test', 'tests_find_files'), 'phtml');
     //then
     DeleteDirectory::recursive($dirPath);
     Assert::thatArray($files)->hasSize(3)->contains($file1, $file2, $file3);
 }