Abstracted filesystem manipulation in InstallCommand

This commit is contained in:
Alejandro Celaya
2017-07-04 20:14:22 +02:00
parent 102f5c4e12
commit dcc09975a9
4 changed files with 34 additions and 10 deletions

View File

@@ -2,6 +2,7 @@
<?php
use Shlinkio\Shlink\CLI\Command\Install\InstallCommand;
use Symfony\Component\Console\Application;
use Symfony\Component\Filesystem\Filesystem;
use Zend\Config\Writer\PhpArray;
chdir(dirname(__DIR__));
@@ -9,7 +10,7 @@ chdir(dirname(__DIR__));
require __DIR__ . '/../vendor/autoload.php';
$app = new Application();
$command = new InstallCommand(new PhpArray());
$command = new InstallCommand(new PhpArray(), new Filesystem());
$app->add($command);
$app->setDefaultCommand($command->getName());
$app->run();

View File

@@ -2,6 +2,7 @@
<?php
use Shlinkio\Shlink\CLI\Command\Install\InstallCommand;
use Symfony\Component\Console\Application;
use Symfony\Component\Filesystem\Filesystem;
use Zend\Config\Writer\PhpArray;
chdir(dirname(__DIR__));
@@ -9,7 +10,7 @@ chdir(dirname(__DIR__));
require __DIR__ . '/../vendor/autoload.php';
$app = new Application();
$command = new InstallCommand(new PhpArray(), true);
$command = new InstallCommand(new PhpArray(), new Filesystem(), true);
$app->add($command);
$app->setDefaultCommand($command->getName());
$app->run();