1 | <?php |
||
17 | class ConfigurationTest extends \PHPUnit_Framework_TestCase |
||
18 | { |
||
19 | public function testProcessSimpleCase() |
||
20 | { |
||
21 | $configs = array( |
||
22 | array( |
||
23 | 'log_dir' => '/foo/bar', |
||
24 | ), |
||
25 | ); |
||
26 | $config = $this->process($configs); |
||
27 | self::assertArrayHasKey('log_dir', $config); |
||
28 | self::assertEquals('/foo/bar', $config['log_dir']); |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * Processes an array of configurations and returns a compiled version. |
||
33 | * |
||
34 | * @param array $configs An array of raw configurations |
||
35 | * |
||
36 | * @return array A normalized array |
||
37 | */ |
||
38 | protected function process($configs) |
||
39 | { |
||
40 | $processor = new Processor(); |
||
41 | |||
42 | return $processor->processConfiguration(new Configuration(), $configs); |
||
43 | } |
||
44 | } |
||
45 |