Completed
Push — master ( 3f8dfc...6f8a88 )
by Dmitry
04:29
created

CredentialsProvider::getClientCredentials()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
nc 1
cc 1
eloc 2
nop 0
1
<?php
2
namespace hipanel\tests\_support\Helper;
3
4
use Codeception\Lib\ModuleContainer;
5
6
/**
7
 * Class CredentialsProvider
8
 *
9
 * @author Dmytro Naumenko <[email protected]>
10
 */
11
class CredentialsProvider extends \Codeception\Module
12
{
13
    public function __construct(ModuleContainer $moduleContainer, $config = null)
14
    {
15
        parent::__construct($moduleContainer, $config);
16
17
        $this->requiredFields = [
18
            // Client
19
            'client.login', 'client.password',
20
            'seller.login', 'seller.password',
21
            'admin.login', 'admin.password',
22
        ];
23
    }
24
25
    public function getClientCredentials(): array
26
    {
27
        return [$this->config['client.login'], $this->config['client.password']];
28
    }
29
30
31
    public function getSellerCredentials(): array
32
    {
33
        return [$this->config['seller.login'], $this->config['seller.password']];
34
    }
35
36
    public function getAdminCredentials(): array
37
    {
38
        return [$this->config['admin.login'], $this->config['admin.password']];
39
    }
40
}
41