ApplicationAvailabilityCest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A _before() 0 4 1
A accessHomepage() 0 7 1
A accessGuestPages() 0 5 1
1
<?php
2
namespace AppBundle;
3
4
use AppBundle\FunctionalTester;
5
use Codeception\Example;
6
7
class ApplicationAvailabilityCest
8
{
9
    public function _before(FunctionalTester $I)
10
    {
11
        $I->followRedirects(false);
12
    }
13
14
    public function accessHomepage(FunctionalTester $I)
15
    {
16
        $I->amOnRoute('homepage');
17
        $I->expect('redirect to kyberia.sk');
18
        $I->seeResponseCodeIs(302);
19
        $I->haveHttpHeader('Location', 'https://kyberia.sk');
20
    }
21
22
    /**
23
     * @example {"url": "/login"}
24
     */
25
    public function accessGuestPages(FunctionalTester $I, Example $example)
26
    {
27
        $I->amOnPage($example['url']);
28
        $I->seeResponseCodeIs(200);
29
    }
30
}
31