make this stuff run

This commit is contained in:
2023-04-29 09:07:57 +02:00
parent 8948ddf01b
commit ecb3a36f48
3 changed files with 7 additions and 7 deletions

View File

@@ -14,7 +14,7 @@ final class Configuration implements ConfigurationInterface
{ {
$treeBuilder = new TreeBuilder('magdev_redmine'); $treeBuilder = new TreeBuilder('magdev_redmine');
$rootNode = $treeBuilder->getRootNode(); $rootNode = $treeBuilder->getRootNode();
$rootNode->fixXmlConfig('connections') $rootNode->fixXmlConfig('connection')
->children() ->children()
->arrayNode('connections') ->arrayNode('connections')
->useAttributeAsKey('name') ->useAttributeAsKey('name')

View File

@@ -17,8 +17,8 @@ class ConfigurationTest extends TestCase
public function testConfig(array $configs): void public function testConfig(array $configs): void
{ {
$config = (new Processor())->processConfiguration(new Configuration(), $configs); $config = (new Processor())->processConfiguration(new Configuration(), $configs);
$this->assertSame('foo', $config['connections']['default']['token']); $this->assertSame('foo', $config['connections']['default']['apikey']);
$this->assertSame('bar', $config['connections']['default']['baseurl']); $this->assertSame('bar', $config['connections']['default']['url']);
} }
public function configsProvider(): iterable public function configsProvider(): iterable
@@ -28,8 +28,8 @@ class ConfigurationTest extends TestCase
'magdev_redmine' => [ 'magdev_redmine' => [
'connections' => [ 'connections' => [
'default' => [ 'default' => [
'token' => 'foo', 'apikey' => 'foo',
'baseurl' => 'bar' 'url' => 'bar'
], ],
], ],
], ],

View File

@@ -18,8 +18,8 @@ class MagdevRedmineExtensionTest extends TestCase
(new MagdevRedmineExtension())->load([ (new MagdevRedmineExtension())->load([
'magdev_redmine' => [ 'magdev_redmine' => [
'connections' => [ 'connections' => [
'primary' => ['baseurl' => 'http://foo1', 'token' => 'bar1'], 'primary' => ['url' => 'http://foo1', 'apikey' => 'bar1'],
'secondary' => ['baseurl' => 'http://foo2', 'token' => 'bar2'], 'secondary' => ['url' => 'http://foo2', 'apikey' => 'bar2'],
], ],
], ],
], $container); ], $container);