Completed
Push — master ( 06c1ce...67d37c )
by Jeroen
06:20
created

unit/DependencyInjection/ConfigurationTest.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
namespace Kunstmaan\MediaBundle\Tests\DependencyInjection;
4
5
use Kunstmaan\MediaBundle\DependencyInjection\Configuration;
6
use Matthias\SymfonyConfigTest\PhpUnit\ConfigurationTestCaseTrait;
7
use PHPUnit\Framework\TestCase;
8
use Symfony\Component\HttpKernel\Kernel;
9
10
/**
11
 * Class ConfigurationTest
12
 */
13 View Code Duplication
class ConfigurationTest extends TestCase
0 ignored issues
show
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
14
{
15
    use ConfigurationTestCaseTrait;
16
17
    /**
18
     * @return \Symfony\Component\Config\Definition\ConfigurationInterface
19
     */
20
    protected function getConfiguration()
21
    {
22
        return new Configuration();
23
    }
24
25
    public function testConfigGeneratesAsExpected()
26
    {
27
        $array = [
28
            'soundcloud_api_key' => 'thisismykey',
29
            'aviary_api_key' => 'apikey',
30
            'remote_video' => [
31
                'vimeo' => false,
32
                'youtube' => true,
33
                'dailymotion' => false,
34
            ],
35
            'enable_pdf_preview' => true,
36
            'blacklisted_extensions' => [],
37
            'web_root' => '%kernel.project_dir%/web',
38
        ];
39
40
        if (Kernel::VERSION_ID >= 40000) {
41
            $array['web_root'] = '%kernel.project_dir%/public';
42
        }
43
44
        $this->assertProcessedConfigurationEquals([$array], $array);
45
    }
46
}
47