diff --git a/module/CLI/config/dependencies.config.php b/module/CLI/config/dependencies.config.php index 2376e5af..a307f48a 100644 --- a/module/CLI/config/dependencies.config.php +++ b/module/CLI/config/dependencies.config.php @@ -8,6 +8,7 @@ use GeoIp2\Database\Reader; use Shlinkio\Shlink\CLI\Util\GeolocationDbUpdater; use Shlinkio\Shlink\Common\Doctrine\NoDbNameConnectionFactory; use Shlinkio\Shlink\Core\Service; +use Shlinkio\Shlink\Installer\Factory\ProcessHelperFactory; use Shlinkio\Shlink\IpGeolocation\GeoLite2\DbUpdater; use Shlinkio\Shlink\IpGeolocation\Resolver\IpLocationResolverInterface; use Shlinkio\Shlink\PreviewGenerator\Service\PreviewGenerator; @@ -23,7 +24,7 @@ return [ 'dependencies' => [ 'factories' => [ SymfonyCli\Application::class => Factory\ApplicationFactory::class, - SymfonyCli\Helper\ProcessHelper::class => Factory\ProcessHelperFactory::class, + SymfonyCli\Helper\ProcessHelper::class => ProcessHelperFactory::class, PhpExecutableFinder::class => InvokableFactory::class, GeolocationDbUpdater::class => ConfigAbstractFactory::class, diff --git a/module/CLI/src/Factory/ProcessHelperFactory.php b/module/CLI/src/Factory/ProcessHelperFactory.php deleted file mode 100644 index 005d513d..00000000 --- a/module/CLI/src/Factory/ProcessHelperFactory.php +++ /dev/null @@ -1,20 +0,0 @@ -setHelperSet(new Helper\HelperSet([ - new Helper\FormatterHelper(), - new Helper\DebugFormatterHelper(), - ])); - - return $processHelper; - } -} diff --git a/module/CLI/test/Factory/ProcessHelperFactoryTest.php b/module/CLI/test/Factory/ProcessHelperFactoryTest.php deleted file mode 100644 index 5042fb73..00000000 --- a/module/CLI/test/Factory/ProcessHelperFactoryTest.php +++ /dev/null @@ -1,29 +0,0 @@ -factory = new ProcessHelperFactory(); - } - - /** @test */ - public function createsTheServiceWithTheProperSetOfHelpers(): void - { - $processHelper = ($this->factory)(); - $helperSet = $processHelper->getHelperSet(); - - $this->assertCount(2, $helperSet); - $this->assertTrue($helperSet->has('formatter')); - $this->assertTrue($helperSet->has('debug_formatter')); - } -}