예제 #1
0
 public function testFilesMethod()
 {
     mkdir(__DIR__ . '/foo');
     file_put_contents(__DIR__ . '/foo/1.txt', '1');
     file_put_contents(__DIR__ . '/foo/2.txt', '2');
     mkdir(__DIR__ . '/foo/bar');
     $files = new Filesystem();
     $this->assertEquals([__DIR__ . '/foo/1.txt', __DIR__ . '/foo/2.txt'], $files->files(__DIR__ . '/foo'));
     unset($files);
     @unlink(__DIR__ . '/foo/1.txt');
     @unlink(__DIR__ . '/foo/2.txt');
     @rmdir(__DIR__ . '/foo/bar');
     @rmdir(__DIR__ . '/foo');
 }