1 | <?php |
||
10 | class PdfTwigTest extends BaseTwigTest |
||
11 | { |
||
12 | protected static $TEMP_PATH = '/../../tmp/pdf/'; |
||
13 | |||
14 | // |
||
15 | // PhpUnit |
||
16 | // |
||
17 | |||
18 | /** |
||
19 | * @return array |
||
20 | */ |
||
21 | public function formatProvider() |
||
22 | { |
||
23 | return [['pdf']]; |
||
24 | } |
||
25 | |||
26 | // |
||
27 | // Tests |
||
28 | // |
||
29 | |||
30 | /** |
||
31 | * @param string $format |
||
32 | * |
||
33 | * @throws \Exception |
||
34 | * |
||
35 | * @dataProvider formatProvider |
||
36 | */ |
||
37 | public function testBasic($format) |
||
38 | { |
||
39 | // Skip PDF test for nightly builds of PHP since mPDF doesn't work |
||
40 | if (version_compare(PHP_VERSION, '7.0.0-dev', '>=')) { |
||
41 | return; |
||
42 | } |
||
43 | |||
44 | $path = $this->getDocument('cellProperties', $format); |
||
45 | |||
46 | static::assertFileExists($path, 'File does not exist'); |
||
47 | static::assertGreaterThan(0, filesize($path), 'File is empty'); |
||
48 | } |
||
49 | } |
||
50 |