Completed
Push — master ( ed2248...76a385 )
by joanhey
05:39
created

PagesControllerTest   A

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.txt.
9
 * It is also available through the world-wide-web at this URL:
10
 * http://wiki.kumbiaphp.com/Licencia
11
 * If you did not receive a copy of the license and are unable to
12
 * obtain it through the world-wide-web, please send an email
13
 * to [email protected] so we can send you a copy immediately.
14
 *
15
 * @category   Kumbia Tests
16
 * @copyright  Copyright (c) 2005 - 2018 Kumbia Team (http://www.kumbiaphp.com)
17
 * @license    http://wiki.kumbiaphp.com/Licencia     New BSD License
18
 */
19
20
use PHPUnit\Framework\TestCase;
21
22
/**
23
 * PagesControllerTest class
24
 */
25
class PagesControllerTest extends TestCase
26
{
27
    use KumbiaTestTrait;
28
    
29
    /**
30
     * testDisplay method
31
     *
32
     * @return void
33
     */
34
    public function testDisplay()
35
    {
36
        $actual = $this->get('/pages/show/kumbia/status/');
37
        $this->assertContains('<h2>config.ini', $actual);
38
        //$test = $this->get('/pages/show/kumbia/status/');
39
        $this->assertResponseCode(200);
40
    }
41
    /**
42
     * 
43
     *
44
     * @return void
45
     */
46
    public function testDisplayNoAction()
47
    {
48
        $actual = $this->get('/pages/kumbia/status/');
49
        $this->assertContains('<h2>config.ini', $actual);
50
        //$test = $this->get('/pages/show/kumbia/status/');
51
        $this->assertResponseCode(200);
52
    }
53
    /**
54
     * expectedException KumbiaException
55
     */
56
    //public function testDisplayNoPage()
57
    //{
58
        //$this->expectException(KumbiaException::class);
59
        //$actual = $this->get('/pages/no_page/');
60
        //$this->assertResponseCode(404);
61
        //$this->assertContains('<h1>Vista "pages/no_page.phtml" no encontrada</h1>', $actual);
62
        //$this->assertResponseCode(404);
63
        //$this->expectException(KumbiaException::class);
64
        
65
    //}
66
}
67