You've already forked redmine-bundle
40 lines
1.1 KiB
PHP
40 lines
1.1 KiB
PHP
<?php declare(strict_types=1);
|
|
|
|
namespace Magdev\RedmineBundle\Tests\DependencyInjection;
|
|
|
|
use Magdev\RedmineBundle\DependencyInjection\Configuration;
|
|
use PHPUnit\Framework\TestCase;
|
|
use Symfony\Component\Config\Definition\Processor;
|
|
|
|
/**
|
|
* @author Marco Grätsch <magdev3.0@gmail.com>
|
|
*/
|
|
class ConfigurationTest extends TestCase
|
|
{
|
|
/**
|
|
* @dataProvider configsProvider
|
|
*/
|
|
public function testConfig(array $configs): void
|
|
{
|
|
$config = (new Processor())->processConfiguration(new Configuration(), $configs);
|
|
$this->assertSame('foo', $config['connections']['default']['token']);
|
|
$this->assertSame('bar', $config['connections']['default']['baseurl']);
|
|
}
|
|
|
|
public function configsProvider(): iterable
|
|
{
|
|
yield [
|
|
[
|
|
'magdev_redmine' => [
|
|
'connections' => [
|
|
'default' => [
|
|
'token' => 'foo',
|
|
'baseurl' => 'bar'
|
|
],
|
|
],
|
|
],
|
|
],
|
|
];
|
|
}
|
|
}
|