AdminTagControllerTest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A testTagListAction() 0 9 1
A testTagCreateAction() 0 8 1
A testTagDeleteAction() 0 5 1
1
<?php
2
3
namespace App\Tests\Functional\Controller;
4
5
class AdminTagControllerTest extends AbstractAdminController
6
{
7
    public function testTagListAction()
8
    {
9
        $this->request('/admin/Tag/list', 'GET', 302);
10
11
        $this->logIn();
12
13
        $this->request('/admin/Tag/list', 'GET', 200);
14
        $this->assertAdminListPageHasColumns(['Title', 'Posts']);
15
    }
16
17
    public function testTagCreateAction()
18
    {
19
        $this->request('/admin/Tag/create', 'GET', 302);
20
21
        $this->logIn();
22
23
        $this->request('/admin/Tag/create', 'GET', 200);
24
    }
25
26
    public function testTagDeleteAction()
27
    {
28
        $object = $this->getEm()->getRepository('App:Tag')->findOneBy([]);
29
        $this->processDeleteAction($object);
30
    }
31
}
32