Completed
Push — master ( ed45a9...528af3 )
by Ma
02:46
created

IndexControllerTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 7 1
A testIndexActionCanBeAccessed() 0 10 1
1
<?php
2
3
/**
4
 * Zend Framework Application (http://mateuszsitek.com/projects/zendframework-application).
5
 *
6
 * @link      http://github.com/ma-si/zendframework-application for the canonical source repository
7
 *
8
 * @copyright Copyright (c) 2006-2016 Aist Internet Technologies (http://aist.pl) All rights reserved.
9
 * @license   http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
10
 */
11
12
namespace ApplicationTest\Controller;
13
14
use Zend\Test\PHPUnit\Controller\AbstractHttpControllerTestCase;
15
16
class IndexControllerTest extends AbstractHttpControllerTestCase
17
{
18
    public function setUp()
19
    {
20
        $this->setApplicationConfig(
21
            include './config/application.config.php'
22
        );
23
        parent::setUp();
24
    }
25
26
    public function testIndexActionCanBeAccessed()
27
    {
28
        $this->dispatch('/');
29
        $this->assertResponseStatusCode(200);
30
31
        $this->assertModuleName('Application');
32
        $this->assertControllerName('Application\Controller\Index');
33
        $this->assertControllerClass('IndexController');
34
        $this->assertMatchedRouteName('home');
35
    }
36
}