| 1 | <?php |
||
| 10 | class CustomConfigTest extends AbstractControllerTest |
||
| 11 | { |
||
| 12 | protected static $ENVIRONMENT = 'custom'; |
||
| 13 | protected static $TEMP_PATH = '/../../tmp/functional/config/'; |
||
| 14 | |||
| 15 | // |
||
| 16 | // PhpUnit |
||
| 17 | // |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @return array |
||
| 21 | */ |
||
| 22 | public function formatProvider() |
||
| 23 | { |
||
| 24 | return [['xlsx']]; |
||
| 25 | } |
||
| 26 | |||
| 27 | // |
||
| 28 | // Tests |
||
| 29 | // |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @param string $format |
||
| 33 | * |
||
| 34 | * @throws \Exception |
||
| 35 | * |
||
| 36 | * @dataProvider formatProvider |
||
| 37 | */ |
||
| 38 | public function testCustomConfig($format) |
||
| 39 | { |
||
| 40 | $document = $this->getDocument(static::$router->generate('test_default', ['templateName' => 'simple', '_format' => $format]), $format); |
||
| 41 | static::assertNotNull($document, 'Document does not exist'); |
||
| 42 | |||
| 43 | static::assertFalse(static::$kernel->getContainer()->getParameter('mewes_k_twig_spreadsheet.pre_calculate_formulas'), 'Unexpected parameter'); |
||
| 44 | static::assertStringEndsWith('tmp/phpSpreadsheet', static::$kernel->getContainer()->getParameter('mewes_k_twig_spreadsheet.disk_caching_directory'), 'Unexpected parameter'); |
||
| 45 | } |
||
| 46 | } |
||
| 47 |