Completed
Push — master ( 8c0a67...1fafee )
by Grégoire
9s
created

MediaAdminTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 13 1
A testItIsInstantiable() 0 4 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\Admin\ORM;
13
14
use Sonata\MediaBundle\Admin\ORM\MediaAdmin;
15
16
class MediaAdminTest extends \PHPUnit_Framework_TestCase
17
{
18
    private $pool;
19
    private $categoryManager;
20
    private $mediaAdmin;
21
22
    protected function setUp()
23
    {
24
        $this->pool = $this->prophesize('Sonata\MediaBundle\Provider\Pool');
25
        $this->categoryManager = $this->prophesize('Sonata\MediaBundle\Model\CategoryManagerInterface');
26
27
        $this->mediaAdmin = new MediaAdmin(
28
            null,
29
            'Sonata\MediaBundle\Entity\BaseMedia',
30
            'SonataMediaBundle:MediaAdmin',
31
            $this->pool->reveal(),
32
            $this->categoryManager->reveal()
33
        );
34
    }
35
36
    public function testItIsInstantiable()
37
    {
38
        $this->assertNotNull($this->mediaAdmin);
39
    }
40
}
41