Passed
Pull Request — master (#16)
by Dmitry
14:13
created

AlternativesTest::configProvider()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 17
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 10
nc 1
nop 0
dl 0
loc 17
rs 9.9332
c 1
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Composer\Config\Tests\Integration\Tests\Config;
6
7
final class AlternativesTest extends ConfigTest
8
{
9
    public function configProvider(): array
10
    {
11
        return [
12
            [
13
                'env_parameter',
14
                fn(string $param) => $this->assertSame('yiiframework.com', $param),
15
                'yiiframework.com/params'
16
            ],
17
            [
18
                'params',
19
                fn(array $params) => $this->assertSame('yiiframework.com', $params['env_parameter']),
20
                'yiiframework.com/web'
21
            ],
22
            [
23
                'params',
24
                fn(array $params) => $this->assertSame('beta.yiiframework.ru', $params['env_parameter']),
25
                'yiiframework.ru/web'
26
            ],
27
        ];
28
    }
29
30
    protected function getDefaultConfigName(): string
31
    {
32
        return 'web';
33
    }
34
}
35