forked from mpdf/mpdf
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIssue1433Test.php
More file actions
42 lines (31 loc) · 843 Bytes
/
Issue1433Test.php
File metadata and controls
42 lines (31 loc) · 843 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
namespace Issues;
use Mpdf\Mpdf;
class Issue1433Test extends \Mpdf\BaseMpdfTest
{
public function testOtfArrayError()
{
$this->mpdf->WriteHTML('<!DOCTYPE html>
<head>
<title>Test</title>
</head>
<body>
<htmlpageheader name="firstpageheader" style="display:none">
</htmlpageheader>
<htmlpagefooter name="firstpagefooter" style="display:none">
</htmlpagefooter>
<htmlpageheader name="otherpageheader" style="display:none">
</htmlpageheader>
<htmlpagefooter name="otherpagefooter" style="display:none">
<div class="footer">{PAGENO}</div>
</htmlpagefooter>
<h3>Hello World</h3>
</body>
</html>
');
$string = $this->mpdf->Output('', 'S');
preg_match_all('/%PDF-1.4/', $string, $matches);
$this->assertArrayHasKey(0, $matches);
$this->assertCount(1, $matches[0]);
}
}