Failed Conditions
Push — master ( 1a6d63...dcbc0d )
by Adrien
05:26
created

FaqControllerTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 100 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testIndexAction() 0 13 1

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
<?php
2
3
class FaqControllerTest extends AbstractControllerTestCase
4
{
5
    public function testIndexAction(): void
6
    {
7
        $params = ['action' => 'index', 'controller' => 'faq', 'module' => 'default'];
8
        $url = $this->url($this->urlizeOptions($params));
9
        $this->dispatch($url);
10
11
        // assertions
12
        $this->assertModule($params['module']);
13
        $this->assertController($params['controller']);
14
        $this->assertAction($params['action']);
15
16
        $this->assertQueryContentContains('li', 'Create an account');
17
        $this->assertQueryContentContains('ul.statusHelp li', 'I want to see this movie');
18
    }
19
}
20