Example #1
0
 public function testLs_withDir()
 {
     $shell = new Shell();
     $dir = $shell->mktempdir();
     for ($i = 0; $i < 5; $i += 1) {
         $shell->touch("{$dir}/blah-{$i}");
     }
     try {
         $files = $shell->ls($dir);
         $this->assertCount(5, $files, 'Dir file count');
         @rmdir($dir);
     } catch (\Exception $e) {
         @rmdir($dir);
         throw $e;
     }
 }