Completed
Push — master ( c3eba2...34879d )
by amaury
05:12 queued 01:44
created

MediaControllerTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 7 1
A testMediaForms() 0 8 1
1
<?php
2
3
namespace OpenOrchestra\FunctionalTests\MediaAdminBundle\Controller;
4
5
use OpenOrchestra\FunctionalTests\Utils\AbstractFormTest;
6
7
/**
8
 * Class MediaControllerTest
9
 *
10
 * @group media
11
 */
12
class MediaControllerTest extends AbstractFormTest
13
{
14
    protected $media;
15
16
    /**
17
     * Set up the test
18
     */
19
    public function setUp()
20
    {
21
        parent::setUp();
22
23
        $mediaRepository = static::$kernel->getContainer()->get('open_orchestra_media.repository.media');
24
        $this->media = $mediaRepository->findOneByName('logo Open-Orchestra');
25
    }
26
27
    /**
28
     * @param string $form
0 ignored issues
show
Bug introduced by
There is no parameter named $form. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
29
     */
30
    public function testMediaForms()
31
    {
32
        $url = '/admin/media/' . $this->media->getId();
33
34
        $this->client->request('GET', $url);
35
36
        $this->assertForm($this->client->getResponse());
37
    }
38
}
39