2019-01-26 02:42:01 -06:00
|
|
|
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace ShlinkioTest\Shlink;
|
|
|
|
|
2019-01-26 03:19:20 -06:00
|
|
|
use GuzzleHttp\Client;
|
2019-01-26 03:59:24 -06:00
|
|
|
use Zend\ConfigAggregator\ConfigAggregator;
|
2019-01-26 02:42:01 -06:00
|
|
|
use Zend\ServiceManager\Factory\InvokableFactory;
|
|
|
|
use function realpath;
|
2019-01-29 06:05:26 -06:00
|
|
|
use function sprintf;
|
2019-01-26 02:42:01 -06:00
|
|
|
use function sys_get_temp_dir;
|
|
|
|
|
2019-01-29 06:05:26 -06:00
|
|
|
$swooleTestingHost = '127.0.0.1';
|
|
|
|
$swooleTestingPort = 9999;
|
|
|
|
|
2019-01-26 02:42:01 -06:00
|
|
|
return [
|
|
|
|
|
2019-01-26 03:59:24 -06:00
|
|
|
'debug' => true,
|
|
|
|
ConfigAggregator::ENABLE_CACHE => false,
|
|
|
|
|
2019-01-27 05:35:00 -06:00
|
|
|
'url_shortener' => [
|
|
|
|
'domain' => [
|
|
|
|
'schema' => 'http',
|
|
|
|
'hostname' => 'doma.in',
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
2019-01-26 02:42:01 -06:00
|
|
|
'zend-expressive-swoole' => [
|
|
|
|
'swoole-http-server' => [
|
2019-01-29 06:05:26 -06:00
|
|
|
'host' => $swooleTestingHost,
|
|
|
|
'port' => $swooleTestingPort,
|
2019-01-26 03:19:20 -06:00
|
|
|
'process-name' => 'shlink_test',
|
2019-01-27 03:15:48 -06:00
|
|
|
'options' => [
|
|
|
|
'pid_file' => sys_get_temp_dir() . '/shlink-test-swoole.pid',
|
|
|
|
],
|
2019-01-26 02:42:01 -06:00
|
|
|
],
|
|
|
|
],
|
|
|
|
|
|
|
|
'dependencies' => [
|
2019-01-29 06:05:26 -06:00
|
|
|
'services' => [
|
|
|
|
'shlink_test_api_client' => new Client([
|
|
|
|
'base_uri' => sprintf('http://%s:%s/', $swooleTestingHost, $swooleTestingPort),
|
|
|
|
]),
|
|
|
|
],
|
2019-01-26 02:42:01 -06:00
|
|
|
'factories' => [
|
|
|
|
Common\TestHelper::class => InvokableFactory::class,
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
|
|
|
'entity_manager' => [
|
|
|
|
'connection' => [
|
|
|
|
'driver' => 'pdo_sqlite',
|
|
|
|
'path' => realpath(sys_get_temp_dir()) . '/shlink-tests.db',
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
2019-01-27 05:14:18 -06:00
|
|
|
'data_fixtures' => [
|
|
|
|
'paths' => [
|
|
|
|
__DIR__ . '/../../module/Rest/test-api/Fixtures',
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
2019-01-26 02:42:01 -06:00
|
|
|
];
|