Created new Installer module and moved everything from CLI there

This commit is contained in:
Alejandro Celaya
2018-09-29 09:52:32 +02:00
parent d5dc6cea99
commit a65ce649ac
26 changed files with 106 additions and 76 deletions

View File

@@ -2,8 +2,8 @@
<?php <?php
declare(strict_types=1); declare(strict_types=1);
use Shlinkio\Shlink\CLI\Factory\InstallApplicationFactory; use Shlinkio\Shlink\Installer\Factory\InstallApplicationFactory;
use Shlinkio\Shlink\CLI\Install\Plugin\DatabaseConfigCustomizer; use Shlinkio\Shlink\Installer\Config\Plugin\DatabaseConfigCustomizer;
use Symfony\Component\Console\Application; use Symfony\Component\Console\Application;
use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Filesystem\Filesystem;
use Zend\ServiceManager\AbstractFactory\ConfigAbstractFactory; use Zend\ServiceManager\AbstractFactory\ConfigAbstractFactory;

View File

@@ -2,8 +2,8 @@
<?php <?php
declare(strict_types=1); declare(strict_types=1);
use Shlinkio\Shlink\CLI\Factory\InstallApplicationFactory; use Shlinkio\Shlink\Installer\Factory\InstallApplicationFactory;
use Shlinkio\Shlink\CLI\Install\Plugin\DatabaseConfigCustomizer; use Shlinkio\Shlink\Installer\Config\Plugin\DatabaseConfigCustomizer;
use Symfony\Component\Console\Application; use Symfony\Component\Console\Application;
use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Filesystem\Filesystem;
use Zend\ServiceManager\AbstractFactory\ConfigAbstractFactory; use Zend\ServiceManager\AbstractFactory\ConfigAbstractFactory;

View File

@@ -61,7 +61,8 @@
"Shlinkio\\Shlink\\CLI\\": "module/CLI/src", "Shlinkio\\Shlink\\CLI\\": "module/CLI/src",
"Shlinkio\\Shlink\\Rest\\": "module/Rest/src", "Shlinkio\\Shlink\\Rest\\": "module/Rest/src",
"Shlinkio\\Shlink\\Core\\": "module/Core/src", "Shlinkio\\Shlink\\Core\\": "module/Core/src",
"Shlinkio\\Shlink\\Common\\": "module/Common/src" "Shlinkio\\Shlink\\Common\\": "module/Common/src",
"Shlinkio\\Shlink\\Installer\\": "module/Installer/src"
}, },
"files": [ "files": [
"module/Common/functions/functions.php" "module/Common/functions/functions.php"
@@ -78,7 +79,8 @@
"ShlinkioTest\\Shlink\\Common\\": [ "ShlinkioTest\\Shlink\\Common\\": [
"module/Common/test", "module/Common/test",
"module/Common/test-func" "module/Common/test-func"
] ],
"ShlinkioTest\\Shlink\\Installer\\": "module/Installer/test"
} }
}, },
"scripts": { "scripts": {
@@ -101,8 +103,8 @@
"phpcov merge build --html build/html" "phpcov merge build --html build/html"
], ],
"stan": "phpstan analyse module/*/src/ --level=6 -c phpstan.neon", "stan": "phpstan analyse module/*/src/ --level=6 -c phpstan.neon",
"infect": "infection --threads=4 --min-msi=55 --only-covered --log-verbosity=2", "infect": "infection --threads=4 --min-msi=60 --only-covered --log-verbosity=2",
"infect-show": "infection --threads=4 --min-msi=55 --only-covered --log-verbosity=2 --show-mutations", "infect-show": "infection --threads=4 --min-msi=60 --only-covered --log-verbosity=2 --show-mutations",
"expressive": "expressive" "expressive": "expressive"
}, },
"config": { "config": {

View File

@@ -1,23 +1,12 @@
<?php <?php
declare(strict_types=1); declare(strict_types=1);
namespace Shlinkio\Shlink;
use Acelaya\ExpressiveErrorHandler; use Acelaya\ExpressiveErrorHandler;
use Shlinkio\Shlink\CLI;
use Shlinkio\Shlink\Common;
use Shlinkio\Shlink\Core;
use Shlinkio\Shlink\Rest;
use Zend\ConfigAggregator; use Zend\ConfigAggregator;
use Zend\Expressive; use Zend\Expressive;
/**
* Configuration files are loaded in a specific order. First ``global.php``, then ``*.global.php``.
* then ``local.php`` and finally ``*.local.php``. This way local settings overwrite global settings.
*
* The configuration can be cached. This can be done by setting ``config_cache_enabled`` to ``true``.
*
* Obviously, if you use closures in your config you can't cache it.
*/
return (new ConfigAggregator\ConfigAggregator([ return (new ConfigAggregator\ConfigAggregator([
Expressive\ConfigProvider::class, Expressive\ConfigProvider::class,
Expressive\Router\ConfigProvider::class, Expressive\Router\ConfigProvider::class,
@@ -31,6 +20,7 @@ return (new ConfigAggregator\ConfigAggregator([
Common\ConfigProvider::class, Common\ConfigProvider::class,
Core\ConfigProvider::class, Core\ConfigProvider::class,
CLI\ConfigProvider::class, CLI\ConfigProvider::class,
Installer\ConfigProvider::class,
Rest\ConfigProvider::class, Rest\ConfigProvider::class,
new ConfigAggregator\ZendConfigProvider('config/{autoload/{{,*.}global,{,*.}local},params/generated_config}.php'), new ConfigAggregator\ZendConfigProvider('config/{autoload/{{,*.}global,{,*.}local},params/generated_config}.php'),
], 'data/cache/app_config.php'))->getMergedConfig(); ], 'data/cache/app_config.php'))->getMergedConfig();

View File

@@ -1,13 +1,14 @@
<?php <?php
declare(strict_types=1); declare(strict_types=1);
use Shlinkio\Shlink\CLI\Command; namespace Shlinkio\Shlink\CLI;
use Shlinkio\Shlink\Common;
use function Shlinkio\Shlink\Common\env;
return [ return [
'cli' => [ 'cli' => [
'locale' => Common\env('CLI_LOCALE', 'en'), 'locale' => env('CLI_LOCALE', 'en'),
'commands' => [ 'commands' => [
Command\ShortUrl\GenerateShortUrlCommand::NAME => Command\ShortUrl\GenerateShortUrlCommand::class, Command\ShortUrl\GenerateShortUrlCommand::NAME => Command\ShortUrl\GenerateShortUrlCommand::class,
Command\ShortUrl\ResolveUrlCommand::NAME => Command\ShortUrl\ResolveUrlCommand::class, Command\ShortUrl\ResolveUrlCommand::NAME => Command\ShortUrl\ResolveUrlCommand::class,

View File

@@ -1,8 +1,8 @@
<?php <?php
declare(strict_types=1); declare(strict_types=1);
use Shlinkio\Shlink\CLI\Command; namespace Shlinkio\Shlink\CLI;
use Shlinkio\Shlink\CLI\Factory\ApplicationFactory;
use Shlinkio\Shlink\Common\Service\IpApiLocationResolver; use Shlinkio\Shlink\Common\Service\IpApiLocationResolver;
use Shlinkio\Shlink\Common\Service\PreviewGenerator; use Shlinkio\Shlink\Common\Service\PreviewGenerator;
use Shlinkio\Shlink\Core\Service; use Shlinkio\Shlink\Core\Service;
@@ -15,7 +15,7 @@ return [
'dependencies' => [ 'dependencies' => [
'factories' => [ 'factories' => [
Application::class => ApplicationFactory::class, Application::class => Factory\ApplicationFactory::class,
Command\ShortUrl\GenerateShortUrlCommand::class => ConfigAbstractFactory::class, Command\ShortUrl\GenerateShortUrlCommand::class => ConfigAbstractFactory::class,
Command\ShortUrl\ResolveUrlCommand::class => ConfigAbstractFactory::class, Command\ShortUrl\ResolveUrlCommand::class => ConfigAbstractFactory::class,

View File

@@ -0,0 +1,16 @@
<?php
declare(strict_types=1);
return [
'translator' => [
'translation_file_patterns' => [
[
'type' => 'gettext',
'base_dir' => __DIR__ . '/../lang',
'pattern' => '%s.mo',
],
],
],
];

View File

@@ -1,13 +1,13 @@
<?php <?php
declare(strict_types=1); declare(strict_types=1);
namespace Shlinkio\Shlink\CLI\Command\Install; namespace Shlinkio\Shlink\Installer\Command;
use Psr\Container\ContainerExceptionInterface; use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface; use Psr\Container\NotFoundExceptionInterface;
use Shlinkio\Shlink\CLI\Install\ConfigCustomizerManagerInterface; use Shlinkio\Shlink\Installer\Config\ConfigCustomizerManagerInterface;
use Shlinkio\Shlink\CLI\Install\Plugin; use Shlinkio\Shlink\Installer\Config\Plugin;
use Shlinkio\Shlink\CLI\Model\CustomizableAppConfig; use Shlinkio\Shlink\Installer\Model\CustomizableAppConfig;
use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Exception\InvalidArgumentException; use Symfony\Component\Console\Exception\InvalidArgumentException;
use Symfony\Component\Console\Exception\LogicException; use Symfony\Component\Console\Exception\LogicException;
@@ -23,7 +23,7 @@ use Zend\Config\Writer\WriterInterface;
class InstallCommand extends Command class InstallCommand extends Command
{ {
const GENERATED_CONFIG_PATH = 'config/params/generated_config.php'; public const GENERATED_CONFIG_PATH = 'config/params/generated_config.php';
/** /**
* @var SymfonyStyle * @var SymfonyStyle
@@ -42,7 +42,7 @@ class InstallCommand extends Command
*/ */
private $filesystem; private $filesystem;
/** /**
* @var ConfigCustomizerManagerInterface * @var \Shlinkio\Shlink\Installer\Config\ConfigCustomizerManagerInterface
*/ */
private $configCustomizers; private $configCustomizers;
/** /**

View File

@@ -1,9 +1,9 @@
<?php <?php
declare(strict_types=1); declare(strict_types=1);
namespace Shlinkio\Shlink\CLI\Install; namespace Shlinkio\Shlink\Installer\Config;
use Shlinkio\Shlink\CLI\Install\Plugin\ConfigCustomizerInterface; use Shlinkio\Shlink\Installer\Config\Plugin\ConfigCustomizerInterface;
use Zend\ServiceManager\AbstractPluginManager; use Zend\ServiceManager\AbstractPluginManager;
class ConfigCustomizerManager extends AbstractPluginManager implements ConfigCustomizerManagerInterface class ConfigCustomizerManager extends AbstractPluginManager implements ConfigCustomizerManagerInterface

View File

@@ -1,7 +1,7 @@
<?php <?php
declare(strict_types=1); declare(strict_types=1);
namespace Shlinkio\Shlink\CLI\Install; namespace Shlinkio\Shlink\Installer\Config;
use Psr\Container\ContainerInterface; use Psr\Container\ContainerInterface;

View File

@@ -1,10 +1,10 @@
<?php <?php
declare(strict_types=1); declare(strict_types=1);
namespace Shlinkio\Shlink\CLI\Install\Plugin; namespace Shlinkio\Shlink\Installer\Config\Plugin;
use Shlinkio\Shlink\CLI\Model\CustomizableAppConfig;
use Shlinkio\Shlink\Common\Util\StringUtilsTrait; use Shlinkio\Shlink\Common\Util\StringUtilsTrait;
use Shlinkio\Shlink\Installer\Model\CustomizableAppConfig;
use Symfony\Component\Console\Style\SymfonyStyle; use Symfony\Component\Console\Style\SymfonyStyle;
class ApplicationConfigCustomizer implements ConfigCustomizerInterface class ApplicationConfigCustomizer implements ConfigCustomizerInterface

View File

@@ -1,9 +1,9 @@
<?php <?php
declare(strict_types=1); declare(strict_types=1);
namespace Shlinkio\Shlink\CLI\Install\Plugin; namespace Shlinkio\Shlink\Installer\Config\Plugin;
use Shlinkio\Shlink\CLI\Model\CustomizableAppConfig; use Shlinkio\Shlink\Installer\Model\CustomizableAppConfig;
use Symfony\Component\Console\Style\SymfonyStyle; use Symfony\Component\Console\Style\SymfonyStyle;
interface ConfigCustomizerInterface interface ConfigCustomizerInterface

View File

@@ -1,16 +1,17 @@
<?php <?php
declare(strict_types=1); declare(strict_types=1);
namespace Shlinkio\Shlink\CLI\Install\Plugin; namespace Shlinkio\Shlink\Installer\Config\Plugin;
use Shlinkio\Shlink\CLI\Model\CustomizableAppConfig; use Shlinkio\Shlink\Installer\Config\Plugin\ConfigCustomizerInterface;
use Shlinkio\Shlink\Installer\Model\CustomizableAppConfig;
use Symfony\Component\Console\Style\SymfonyStyle; use Symfony\Component\Console\Style\SymfonyStyle;
use Symfony\Component\Filesystem\Exception\IOException; use Symfony\Component\Filesystem\Exception\IOException;
use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Filesystem\Filesystem;
class DatabaseConfigCustomizer implements ConfigCustomizerInterface class DatabaseConfigCustomizer implements ConfigCustomizerInterface
{ {
const DATABASE_DRIVERS = [ private const DATABASE_DRIVERS = [
'MySQL' => 'pdo_mysql', 'MySQL' => 'pdo_mysql',
'PostgreSQL' => 'pdo_pgsql', 'PostgreSQL' => 'pdo_pgsql',
'SQLite' => 'pdo_sqlite', 'SQLite' => 'pdo_sqlite',

View File

@@ -1,18 +1,19 @@
<?php <?php
declare(strict_types=1); declare(strict_types=1);
namespace Shlinkio\Shlink\CLI\Install\Plugin; namespace Shlinkio\Shlink\Installer\Config\Plugin;
use Shlinkio\Shlink\CLI\Model\CustomizableAppConfig; use Shlinkio\Shlink\Installer\Config\Plugin\ConfigCustomizerInterface;
use Shlinkio\Shlink\Installer\Model\CustomizableAppConfig;
use Symfony\Component\Console\Style\SymfonyStyle; use Symfony\Component\Console\Style\SymfonyStyle;
class LanguageConfigCustomizer implements ConfigCustomizerInterface class LanguageConfigCustomizer implements ConfigCustomizerInterface
{ {
const SUPPORTED_LANGUAGES = ['en', 'es']; private const SUPPORTED_LANGUAGES = ['en', 'es'];
/** /**
* @param SymfonyStyle $io * @param SymfonyStyle $io
* @param CustomizableAppConfig $appConfig * @param \Shlinkio\Shlink\Installer\Model\CustomizableAppConfig $appConfig
* @return void * @return void
*/ */
public function process(SymfonyStyle $io, CustomizableAppConfig $appConfig) public function process(SymfonyStyle $io, CustomizableAppConfig $appConfig)

View File

@@ -1,11 +1,12 @@
<?php <?php
declare(strict_types=1); declare(strict_types=1);
namespace Shlinkio\Shlink\CLI\Install\Plugin; namespace Shlinkio\Shlink\Installer\Config\Plugin;
use Shlinkio\Shlink\CLI\Model\CustomizableAppConfig;
use Shlinkio\Shlink\Core\Service\UrlShortener; use Shlinkio\Shlink\Core\Service\UrlShortener;
use Shlinkio\Shlink\Installer\Model\CustomizableAppConfig;
use Symfony\Component\Console\Style\SymfonyStyle; use Symfony\Component\Console\Style\SymfonyStyle;
use function str_shuffle;
class UrlShortenerConfigCustomizer implements ConfigCustomizerInterface class UrlShortenerConfigCustomizer implements ConfigCustomizerInterface
{ {
@@ -36,7 +37,7 @@ class UrlShortenerConfigCustomizer implements ConfigCustomizerInterface
function ($value) { function ($value) {
return $value; return $value;
} }
) ?: \str_shuffle(UrlShortener::DEFAULT_CHARS), ) ?: str_shuffle(UrlShortener::DEFAULT_CHARS),
'VALIDATE_URL' => $io->confirm('Do you want to validate long urls by 200 HTTP status code on response'), 'VALIDATE_URL' => $io->confirm('Do you want to validate long urls by 200 HTTP status code on response'),
]); ]);
} }

View File

@@ -0,0 +1,15 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\Installer;
use Zend\Config\Factory;
use Zend\Stdlib\Glob;
class ConfigProvider
{
public function __invoke()
{
return Factory::fromFiles(Glob::glob(__DIR__ . '/../config/{,*.}config.php', Glob::GLOB_BRACE));
}
}

View File

@@ -1,13 +1,13 @@
<?php <?php
declare(strict_types=1); declare(strict_types=1);
namespace Shlinkio\Shlink\CLI\Factory; namespace Shlinkio\Shlink\Installer\Factory;
use Interop\Container\ContainerInterface; use Interop\Container\ContainerInterface;
use Interop\Container\Exception\ContainerException; use Interop\Container\Exception\ContainerException;
use Shlinkio\Shlink\CLI\Command\Install\InstallCommand; use Shlinkio\Shlink\Installer\Command\InstallCommand;
use Shlinkio\Shlink\CLI\Install\ConfigCustomizerManager; use Shlinkio\Shlink\Installer\Config\ConfigCustomizerManager;
use Shlinkio\Shlink\CLI\Install\Plugin; use Shlinkio\Shlink\Installer\Config\Plugin;
use Symfony\Component\Console\Application; use Symfony\Component\Console\Application;
use Symfony\Component\Console\Exception\LogicException; use Symfony\Component\Console\Exception\LogicException;
use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Filesystem\Filesystem;

View File

@@ -1,13 +1,13 @@
<?php <?php
declare(strict_types=1); declare(strict_types=1);
namespace Shlinkio\Shlink\CLI\Model; namespace Shlinkio\Shlink\Installer\Model;
use Zend\Stdlib\ArraySerializableInterface; use Zend\Stdlib\ArraySerializableInterface;
final class CustomizableAppConfig implements ArraySerializableInterface final class CustomizableAppConfig implements ArraySerializableInterface
{ {
const SQLITE_DB_PATH = 'data/database.sqlite'; public const SQLITE_DB_PATH = 'data/database.sqlite';
/** /**
* @var array * @var array

View File

@@ -1,15 +1,15 @@
<?php <?php
declare(strict_types=1); declare(strict_types=1);
namespace ShlinkioTest\Shlink\CLI\Command\Install; namespace ShlinkioTest\Shlink\Installer\Command;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Prophecy\Argument; use Prophecy\Argument;
use Prophecy\Prophecy\MethodProphecy; use Prophecy\Prophecy\MethodProphecy;
use Prophecy\Prophecy\ObjectProphecy; use Prophecy\Prophecy\ObjectProphecy;
use Shlinkio\Shlink\CLI\Command\Install\InstallCommand; use Shlinkio\Shlink\Installer\Command\InstallCommand;
use Shlinkio\Shlink\CLI\Install\ConfigCustomizerManagerInterface; use Shlinkio\Shlink\Installer\Config\ConfigCustomizerManagerInterface;
use Shlinkio\Shlink\CLI\Install\Plugin\ConfigCustomizerInterface; use Shlinkio\Shlink\Installer\Config\Plugin\ConfigCustomizerInterface;
use Symfony\Component\Console\Application; use Symfony\Component\Console\Application;
use Symfony\Component\Console\Helper\ProcessHelper; use Symfony\Component\Console\Helper\ProcessHelper;
use Symfony\Component\Console\Tester\CommandTester; use Symfony\Component\Console\Tester\CommandTester;
@@ -131,14 +131,14 @@ class InstallCommandTest extends TestCase
/** @var MethodProphecy $importedConfigExists */ /** @var MethodProphecy $importedConfigExists */
$importedConfigExists = $this->filesystem->exists( $importedConfigExists = $this->filesystem->exists(
__DIR__ . '/../../../test-resources/' . InstallCommand::GENERATED_CONFIG_PATH __DIR__ . '/../../test-resources/' . InstallCommand::GENERATED_CONFIG_PATH
)->willReturn(true); )->willReturn(true);
$this->commandTester->setInputs([ $this->commandTester->setInputs([
'', '',
'/foo/bar/wrong_previous_shlink', '/foo/bar/wrong_previous_shlink',
'', '',
__DIR__ . '/../../../test-resources', __DIR__ . '/../../test-resources',
]); ]);
$this->commandTester->execute([]); $this->commandTester->execute([]);

View File

@@ -1,13 +1,13 @@
<?php <?php
declare(strict_types=1); declare(strict_types=1);
namespace ShlinkioTest\Shlink\CLI\Install\Plugin; namespace ShlinkioTest\Shlink\Installer\Config\Plugin;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Prophecy\Argument; use Prophecy\Argument;
use Prophecy\Prophecy\ObjectProphecy; use Prophecy\Prophecy\ObjectProphecy;
use Shlinkio\Shlink\CLI\Install\Plugin\ApplicationConfigCustomizer; use Shlinkio\Shlink\Installer\Config\Plugin\ApplicationConfigCustomizer;
use Shlinkio\Shlink\CLI\Model\CustomizableAppConfig; use Shlinkio\Shlink\Installer\Model\CustomizableAppConfig;
use Symfony\Component\Console\Style\SymfonyStyle; use Symfony\Component\Console\Style\SymfonyStyle;
class ApplicationConfigCustomizerTest extends TestCase class ApplicationConfigCustomizerTest extends TestCase

View File

@@ -1,13 +1,13 @@
<?php <?php
declare(strict_types=1); declare(strict_types=1);
namespace ShlinkioTest\Shlink\CLI\Install\Plugin; namespace ShlinkioTest\Shlink\Installer\Config\Plugin;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Prophecy\Argument; use Prophecy\Argument;
use Prophecy\Prophecy\ObjectProphecy; use Prophecy\Prophecy\ObjectProphecy;
use Shlinkio\Shlink\CLI\Install\Plugin\DatabaseConfigCustomizer; use Shlinkio\Shlink\Installer\Config\Plugin\DatabaseConfigCustomizer;
use Shlinkio\Shlink\CLI\Model\CustomizableAppConfig; use Shlinkio\Shlink\Installer\Model\CustomizableAppConfig;
use Symfony\Component\Console\Style\SymfonyStyle; use Symfony\Component\Console\Style\SymfonyStyle;
use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Filesystem\Filesystem;

View File

@@ -1,13 +1,13 @@
<?php <?php
declare(strict_types=1); declare(strict_types=1);
namespace ShlinkioTest\Shlink\CLI\Install\Plugin; namespace ShlinkioTest\Shlink\Installer\Config\Plugin;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Prophecy\Argument; use Prophecy\Argument;
use Prophecy\Prophecy\ObjectProphecy; use Prophecy\Prophecy\ObjectProphecy;
use Shlinkio\Shlink\CLI\Install\Plugin\LanguageConfigCustomizer; use Shlinkio\Shlink\Installer\Config\Plugin\LanguageConfigCustomizer;
use Shlinkio\Shlink\CLI\Model\CustomizableAppConfig; use Shlinkio\Shlink\Installer\Model\CustomizableAppConfig;
use Symfony\Component\Console\Style\SymfonyStyle; use Symfony\Component\Console\Style\SymfonyStyle;
class LanguageConfigCustomizerTest extends TestCase class LanguageConfigCustomizerTest extends TestCase

View File

@@ -1,13 +1,13 @@
<?php <?php
declare(strict_types=1); declare(strict_types=1);
namespace ShlinkioTest\Shlink\CLI\Install\Plugin; namespace ShlinkioTest\Shlink\Installer\Config\Plugin;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Prophecy\Argument; use Prophecy\Argument;
use Prophecy\Prophecy\ObjectProphecy; use Prophecy\Prophecy\ObjectProphecy;
use Shlinkio\Shlink\CLI\Install\Plugin\UrlShortenerConfigCustomizer; use Shlinkio\Shlink\Installer\Config\Plugin\UrlShortenerConfigCustomizer;
use Shlinkio\Shlink\CLI\Model\CustomizableAppConfig; use Shlinkio\Shlink\Installer\Model\CustomizableAppConfig;
use Symfony\Component\Console\Style\SymfonyStyle; use Symfony\Component\Console\Style\SymfonyStyle;
class UrlShortenerConfigCustomizerTest extends TestCase class UrlShortenerConfigCustomizerTest extends TestCase

View File

@@ -1,10 +1,10 @@
<?php <?php
declare(strict_types=1); declare(strict_types=1);
namespace ShlinkioTest\Shlink\CLI\Factory; namespace ShlinkioTest\Shlink\Installer\Factory;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Shlinkio\Shlink\CLI\Factory\InstallApplicationFactory; use Shlinkio\Shlink\Installer\Factory\InstallApplicationFactory;
use Symfony\Component\Console\Application; use Symfony\Component\Console\Application;
use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Filesystem\Filesystem;
use Zend\ServiceManager\ServiceManager; use Zend\ServiceManager\ServiceManager;

View File

@@ -17,6 +17,9 @@
<testsuite name="CLI"> <testsuite name="CLI">
<directory>./module/CLI/test</directory> <directory>./module/CLI/test</directory>
</testsuite> </testsuite>
<testsuite name="Installer">
<directory>./module/Installer/test</directory>
</testsuite>
</testsuites> </testsuites>
<filter> <filter>