UsersPresenterTest   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

5 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 6 1
A testDefault() 0 8 1
A testUpdateUserDialog() 0 8 1
A testRoles() 0 8 1
A testUpdateRoleDialog() 0 8 1
1
<?php
2
3
class UsersPresenterTest extends \WebCMS\Tests\PresenterTestCase
4
{
5
    public function setUp()
6
    {
7
        parent::setUp();
8
9
        $this->createPresenter('Admin:Users');
10
    }
11
12
    public function testDefault()
13
    {
14
        $response = $this->makeRequest();
15
16
        $this->assertInstanceOf('Nette\Application\Responses\TextResponse', $response);
17
18
        $this->getResponse($response);
19
    }
20
21
    public function testUpdateUserDialog()
22
    {
23
        $response = $this->makeRequest('updateUser');
24
25
        $this->assertInstanceOf('Nette\Application\Responses\TextResponse', $response);
26
27
        $this->getResponse($response);
28
    }
29
30
    public function testRoles()
31
    {
32
        $response = $this->makeRequest('roles');
33
34
        $this->assertInstanceOf('Nette\Application\Responses\TextResponse', $response);
35
36
        $this->getResponse($response);
37
    }
38
39
    public function testUpdateRoleDialog()
40
    {
41
        $response = $this->makeRequest('updateRole');
42
43
        $this->assertInstanceOf('Nette\Application\Responses\TextResponse', $response);
44
45
        $this->getResponse($response);
46
    }
47
}
48