mirror of
https://github.com/shlinkio/shlink.git
synced 2025-02-25 18:45:27 -06:00
Created a config prost-processor which adds the base path on every applicable configuration
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace ShlinkioTest\Shlink\Core;
|
||||
namespace ShlinkioTest\Shlink\Core\Config;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Shlinkio\Shlink\Core\SimplifiedConfigParser;
|
||||
use Shlinkio\Shlink\Core\Config\SimplifiedConfigParser;
|
||||
|
||||
use function array_merge;
|
||||
|
||||
@@ -50,6 +50,7 @@ class SimplifiedConfigParserTest extends TestCase
|
||||
'password' => 'bar',
|
||||
'port' => '1234',
|
||||
],
|
||||
'base_path' => '/foo/bar',
|
||||
];
|
||||
$expected = [
|
||||
'app_options' => [
|
||||
@@ -96,6 +97,10 @@ class SimplifiedConfigParserTest extends TestCase
|
||||
'tcp://1.2.2.2:2222',
|
||||
],
|
||||
],
|
||||
|
||||
'router' => [
|
||||
'base_path' => '/foo/bar',
|
||||
],
|
||||
];
|
||||
|
||||
$result = ($this->postProcessor)(array_merge($config, $simplified));
|
||||
Reference in New Issue
Block a user