Completed
Pull Request — master (#23)
by
unknown
05:44
created

Seller::login()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 13
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 13
rs 9.4285
c 0
b 0
f 0
nc 2
cc 2
eloc 7
nop 0
1
<?php
2
3
namespace hipanel\tests\_support\Step\Acceptance;
4
5
use hipanel\tests\_support\Page\Login;
6
7
/**
8
 * Class Seller
9
 *
10
 * @author Dmytro Naumenko <[email protected]>
11
 */
12
class Seller extends Client
13
{
14
    public function login()
15
    {
16
        if ($this->loadSessionSnapshot('login-seller')) {
17
            return $this;
18
        }
19
20
        $hiam = new Login($this);
21
        $hiam->login($this->username, $this->password);
22
23
        $this->saveSessionSnapshot('login-seller');
24
25
        return $this;
26
    }
27
28
    protected function initCredentials()
29
    {
30
        [$this->username, $this->password] = $this->getSellertCredentials();
31
    }
32
}
33