Exemplo n.º 1
0
 public function testFsRelativeSymlinks()
 {
     $dir = __DIR__ . '/03/output';
     ob_start();
     $command = new Commands\Filesystem\Symlink();
     $command->createRelative($dir, 'testfile.json', 'sym-rel-testfile.json');
     ob_end_clean();
     $this->assertTrue(is_link($dir . '/sym-rel-testfile.json'));
     $command = new Commands\Filesystem\Filesystem();
     $command->addSymlinksRelativeToCreate(['symlink' => '../'], $dir);
     ob_start();
     $command->execute();
     ob_end_clean();
     $this->assertTrue(is_link($dir . '/symlink'));
     if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
         // AppVeyor cannot delete symlinks created by exec()
         return;
     }
     $command = new Commands\Filesystem\Filesystem();
     $command->addDirectoriesToClean([$dir]);
     ob_start();
     $command->execute();
     ob_end_clean();
     $res = glob($dir . "/*");
     $this->assertCount(0, $res);
 }
Exemplo n.º 2
0
 private function prepareFilesystem()
 {
     $this->logSection('Create directories and files.');
     $this->filesystemInit->execute();
     $this->log("Directories and files created.");
 }