Completed
Push — master ( 972ef8...f0e675 )
by
unknown
03:54
created

ConfigurationTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 21
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A testAdminFormat() 0 18 1
1
<?php
2
3
/*
4
 * This file is part of the Sonata Project package.
5
 *
6
 * (c) Thomas Rabaix <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Sonata\MediaBundle\Tests;
13
14
use Sonata\MediaBundle\DependencyInjection\Configuration;
15
use Symfony\Component\Config\Definition\Processor;
16
17
class ConfigurationTest extends \PHPUnit_Framework_TestCase
18
{
19
    public function testAdminFormat()
20
    {
21
        $processor = new Processor();
22
23
        $config = $processor->processConfiguration(new Configuration(), array(
24
            array(
25
                'db_driver'       => 'foo',
26
                'default_context' => 'default',
27
            ),
28
        ));
29
30
        $this->assertNotNull($config['admin_format']);
31
        $this->assertSame(200, $config['admin_format']['width']);
32
        $this->assertSame(false, $config['admin_format']['height']);
33
        $this->assertSame(90, $config['admin_format']['quality']);
34
        $this->assertSame('jpg', $config['admin_format']['format']);
35
        $this->assertSame(true, $config['admin_format']['constraint']);
36
    }
37
}
38