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

GalleryAdminTest::setUp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 9
nc 1
nop 0
dl 0
loc 13
rs 9.4285
c 0
b 0
f 0
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;
13
14
use Sonata\MediaBundle\Admin\GalleryAdmin;
15
16
class GalleryAdminTest extends \PHPUnit_Framework_TestCase
17
{
18
    protected $pool;
19
    protected $categoryManager;
20
    protected $mediaAdmin;
21
22
    protected function setUp()
23
    {
24
        $this->pool = $this->prophesize('Sonata\MediaBundle\Provider\Pool');
25
        $this->categoryManager = $this->prophesize('Sonata\ClassificationBundle\Entity\CategoryManager');
26
27
        $this->mediaAdmin = new GalleryAdmin(
28
            null,
29
            'Sonata\MediaBundle\Entity\BaseGallery',
30
            'SonataMediaBundle:GalleryAdmin',
31
            $this->pool->reveal(),
32
            $this->categoryManager->reveal()
0 ignored issues
show
Unused Code introduced by
The call to GalleryAdmin::__construct() has too many arguments starting with $this->categoryManager->reveal().

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
33
        );
34
    }
35
36
    public function testItIsInstantiable()
37
    {
38
        $this->assertNotNull($this->mediaAdmin);
39
    }
40
}
41