PagesControllerTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testDisplay() 0 7 1
A testDisplayNoAction() 0 7 1
1
<?php
2
/**
3
 * KumbiaPHP web & app Framework
4
 *
5
 * LICENSE
6
 *
7
 * This source file is subject to the new BSD license that is bundled
8
 * with this package in the file LICENSE.
9
 *
10
 * @category   Kumbia Tests
11
 * @package    Controller
12
 *
13
 * @copyright  Copyright (c) 2005 - 2019 KumbiaPHP Team (http://www.kumbiaphp.com)
14
 * @license    https://github.com/KumbiaPHP/KumbiaPHP/blob/master/LICENSE   New BSD License
15
 */
16
17
use PHPUnit\Framework\TestCase;
18
19
/**
20
 * PagesControllerTest class
21
 */
22
class PagesControllerTest extends TestCase
23
{
24
    use KumbiaTestTrait;
25
    
26
    /**
27
     * testDisplay method
28
     *
29
     * @return void
30
     */
31
    public function testDisplay()
32
    {
33
        $actual = $this->get('/pages/show/kumbia/status/');
34
        $this->assertContains('<h2>config.ini', $actual);
35
        //$test = $this->get('/pages/show/kumbia/status/');
36
        $this->assertResponseCode(200);
37
    }
38
    /**
39
     * 
40
     *
41
     * @return void
42
     */
43
    public function testDisplayNoAction()
44
    {
45
        $actual = $this->get('/pages/kumbia/status/');
46
        $this->assertContains('<h2>config.ini', $actual);
47
        //$test = $this->get('/pages/show/kumbia/status/');
48
        $this->assertResponseCode(200);
49
    }
50
    /**
51
     * expectedException KumbiaException
52
     */
53
    //public function testDisplayNoPage()
54
    //{
55
        //$this->expectException(KumbiaException::class);
56
        //$actual = $this->get('/pages/no_page/');
57
        //$this->assertResponseCode(404);
58
        //$this->assertContains('<h1>Vista "pages/no_page.phtml" no encontrada</h1>', $actual);
59
        //$this->assertResponseCode(404);
60
        //$this->expectException(KumbiaException::class);
61
        
62
    //}
63
}
64