Completed
Push — master ( c69dc2...614661 )
by Dmitry
10:19 queued 07:23
created

Manager::initCredentials()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

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