You've already forked gitea-bundle
Initial commit
This commit is contained in:
41
tests/DependencyInjection/ConfigurationTest.php
Normal file
41
tests/DependencyInjection/ConfigurationTest.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Magdev\GiteaBundle\Tests\DependencyInjection;
|
||||
|
||||
use Magdev\GiteaBundle\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_gitea' => [
|
||||
'connections' => [
|
||||
'default' => [
|
||||
'token' => 'foo',
|
||||
'baseurl' => 'bar'
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user