Skip to content
This repository has been archived by the owner on Mar 31, 2022. It is now read-only.

Commit

Permalink
Add test for Configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Robin committed Dec 16, 2020
1 parent d760feb commit 8b433ec
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions tests/DependencyInjection/ConfigurationTest.php
@@ -0,0 +1,30 @@
<?php

declare(strict_types=1);

namespace PiedWeb\CMSBundle\Tests\DependencyInjection;

use PHPUnit\Framework\TestCase;
use PiedWeb\CMSBundle\DependencyInjection\Configuration;
use Symfony\Bridge\PhpUnit\ExpectDeprecationTrait;
use Symfony\Component\Config\Definition\Exception\InvalidTypeException;
use Symfony\Component\Config\Definition\Processor;

class ConfigurationTest extends TestCase
{
use ExpectDeprecationTrait;

public function testConf(): void
{
$config = $this->process([]);

$this->assertSame($config['locale'], '%locale%');
}

protected function process($configs): array
{
$processor = new Processor();

return $processor->processConfiguration(new Configuration(), $configs);
}
}

0 comments on commit 8b433ec

Please sign in to comment.