@@ 28-40 (lines=13) @@ | ||
25 | * @covers \Asm\Config\AbstractConfig::readConfig |
|
26 | * @covers \Asm\Config\AbstractConfig::setConfig |
|
27 | */ |
|
28 | public function testFactory() |
|
29 | { |
|
30 | $config = Config::factory( |
|
31 | [ |
|
32 | 'file' => $this->getTestYaml(), |
|
33 | ], |
|
34 | 'ConfigDefault' |
|
35 | ); |
|
36 | ||
37 | $this->assertInstanceOf('Asm\Config\ConfigDefault', $config); |
|
38 | ||
39 | return $config; |
|
40 | } |
|
41 | ||
42 | /** |
|
43 | * @depends testFactory |
@@ 30-43 (lines=14) @@ | ||
27 | * @covers \Asm\Config\ConfigEnv::__construct |
|
28 | * @return \Asm\Config\ConfigInterface |
|
29 | */ |
|
30 | public function testFactoryProd() |
|
31 | { |
|
32 | // merged environments config |
|
33 | $config = Config::factory( |
|
34 | [ |
|
35 | 'file' => $this->getTestYaml(), |
|
36 | ], |
|
37 | 'ConfigEnv' |
|
38 | ); |
|
39 | ||
40 | $this->assertInstanceOf('Asm\Config\ConfigEnv', $config); |
|
41 | ||
42 | return $config; |
|
43 | } |
|
44 | ||
45 | /** |
|
46 | * @covers \Asm\Config\ConfigEnv::mergeEnvironments |
@@ 42-53 (lines=12) @@ | ||
39 | /** |
|
40 | * @covers \Asm\Config\Config::factory |
|
41 | */ |
|
42 | public function testFactoryWithoutFilecheck() |
|
43 | { |
|
44 | $config = Config::factory( |
|
45 | [ |
|
46 | 'file' => $this->getTestYaml(), |
|
47 | 'filecheck' => false, |
|
48 | ], |
|
49 | 'ConfigDefault' |
|
50 | ); |
|
51 | ||
52 | $this->assertInstanceOf('Asm\Config\ConfigDefault', $config); |
|
53 | } |
|
54 | ||
55 | /** |
|
56 | * @expectedException \ErrorException |