Completed
Pull Request — master (#4)
by Klochok
10:05
created

ConfirmEmailCest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A ensureIAmGetWrongEmailToConfirmError() 0 9 1
A ensureIGetErrorsWhenRequiredParamsIsNotPassed() 0 11 1
1
<?php
2
3
namespace hiam\mrdp\tests\acceptance;
4
5
use hiam\tests\_support\AcceptanceTester;
6
7
class ConfirmEmailCest
8
{
9
    public function ensureIAmGetWrongEmailToConfirmError(AcceptanceTester $I)
10
    {
11
        $I->wantTo('check wrong email to confirm is get error.');
12
        $I->amOnPage('/registration/confirm?' . http_build_query([
13
                'email' => '[email protected]', 'client' => 'test_client', 'id' => 1234567, 'salt' => 'test_salt',
14
                'hash' => 'test_hash', 'what' => 'contactConfirmEmail',
15
            ]));
16
        $I->see('wrong email to confirm');
17
    }
18
19
    public function ensureIGetErrorsWhenRequiredParamsIsNotPassed(AcceptanceTester $I)
20
    {
21
        $I->wantTo('check when url without required params has an validation error.');
22
        $I->amOnPage('/registration/confirm');
23
        $I->see('Id cannot be blank');
24
        $I->see('Client cannot be blank');
25
        $I->see('Email cannot be blank');
26
        $I->see('What cannot be blank');
27
        $I->see('Salt cannot be blank');
28
        $I->see('Hash cannot be blank');
29
    }
30
}
31