| Total Complexity | 4 |
| Total Lines | 46 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | class ConfigTest extends TestCase |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * @throws \Mrcnpdlk\Lib\ConfigurationException |
||
| 20 | */ |
||
| 21 | public function testConstruct_1(): void |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @throws \Mrcnpdlk\Lib\ConfigurationException |
||
| 29 | */ |
||
| 30 | public function testConstruct_2(): void |
||
| 31 | { |
||
| 32 | $oConfig = new Config([]); |
||
| 33 | $this->assertTrue(true); |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @throws \Mrcnpdlk\Lib\ConfigurationException |
||
| 38 | */ |
||
| 39 | public function testConstruct_3(): void |
||
| 40 | { |
||
| 41 | $oConfig = new Config([ |
||
| 42 | 'binary' => 'some_binary_file', |
||
| 43 | 'host' => '127.0.0.1', |
||
| 44 | 'port' => 2345, |
||
| 45 | 'docType' => DocType::GRAPHICS(), |
||
| 46 | 'format' => FormatType::PDF(), |
||
| 47 | 'timeout' => 10, |
||
| 48 | ]); |
||
| 49 | $this->assertSame(DocType::GRAPHICS, $oConfig->getDocType()->getValue()); |
||
| 50 | $this->assertSame(FormatType::PDF, $oConfig->getFormat()->getValue()); |
||
| 51 | $this->assertSame(10, $oConfig->getTimeout()); |
||
| 52 | } |
||
| 53 | |||
| 54 | /** |
||
| 55 | * @throws \Mrcnpdlk\Lib\ConfigurationException |
||
| 56 | */ |
||
| 57 | public function testConstruct_invalid(): void |
||
| 62 | ]); |
||
| 63 | } |
||
| 64 | } |
||
| 65 |