<?php declare(strict_types=1);
/*
 * This file is part of "irstea/make-shim".
 * (c) 2019 Irstea <dsi.poleis@irstea.fr>
 *
 * For the full copyright and license information, please view the LICENSE.md
 * file that was distributed with this source code.
 */

namespace Irstea\MakeShim\Tests\Configuration\Phive;

use Irstea\MakeShim\Configuration\Phive\Repository;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Config\Definition\Processor;
use Symfony\Component\Config\Util\XmlUtils;

/**
 * Class PhiveRepositoriesTest.
 */
final class RepositoryTest extends TestCase
{
    public function testRepository(): void
    {
        $domDocument = XmlUtils::loadFile(__DIR__ . '/fixtures/repository.xml');
        $input = XmlUtils::convertDomElementToArray($domDocument->documentElement);

        $proc = new Processor();
        $config = new Repository();

        $result = $proc->processConfiguration($config, [$input]);
        dump($result);

        self::assertIsArray($result);
    }
}