Completed
Push — master ( 60654f...7bbb13 )
by Klochok
04:17
created

Client   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A login() 17 17 2
1
<?php
2
3
namespace hipanel\tests\_support\Step\Acceptance;
4
5 View Code Duplication
class Client extends \AcceptanceTester
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
6
{
7
    protected $username = '';
8
9
    protected $password = '';
10
11
    public function login()
12
    {
13
        $I = $this;
14
        if ($I->loadSessionSnapshot('login-client')) {
15
            return;
16
        }
17
        $I->wantTo('login as Client');
18
        $I->amOnPage('/site/login');
19
        $I->submitForm('#login-form', [
20
            'LoginForm' => [
21
                'username' => $this->username,
22
                'password' => $this->password,
23
            ]
24
        ]);
25
        $I->see($this->username, '.navbar-custom-menu li.dropdown.user.user-menu a span.hidden-xs');
26
        $I->saveSessionSnapshot('login-client');
27
    }
28
}