forked from mpdf/mpdf
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIssue834Test.php
More file actions
49 lines (39 loc) · 1.66 KB
/
Issue834Test.php
File metadata and controls
49 lines (39 loc) · 1.66 KB
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
43
44
45
46
47
48
49
<?php
namespace Issues;
use Mpdf\BaseMpdfTest;
use Mpdf\Output\Destination;
final class Issue834Test extends BaseMpdfTest
{
public function testInputFormFontSizeAuto()
{
$this->mpdf->useActiveForms = true;
$this->mpdf->WriteHTML('<form><input type="text" name="test" style="font-size: auto" /></form>');
$output = $this->mpdf->Output('', Destination::STRING_RETURN);
$this->assertStringContainsString('/T (test)', $output);
$this->assertStringContainsString('/DA (/F2 0 Tf 0.000 g)', $output);
}
public function testTextareaFormFontSizeAuto()
{
$this->mpdf->useActiveForms = true;
$this->mpdf->WriteHTML('<form><textarea name="test" style="font-size: auto"> </textarea></form>');
$output = $this->mpdf->Output('', Destination::STRING_RETURN);
$this->assertStringContainsString('/T (test)', $output);
$this->assertStringContainsString('/DA (/F2 0 Tf 0.000 g)', $output);
}
public function testInputFormFontSize10pt()
{
$this->mpdf->useActiveForms = true;
$this->mpdf->WriteHTML('<form><input type="text" name="test" style="font-size: 10pt" /></form>');
$output = $this->mpdf->Output('', Destination::STRING_RETURN);
$this->assertStringContainsString('/T (test)', $output);
$this->assertStringContainsString('/DA (/F2 10 Tf 0.000 g)', $output);
}
public function testTextareaFormFontSize10pt()
{
$this->mpdf->useActiveForms = true;
$this->mpdf->WriteHTML('<form><textarea name="test" style="font-size: 10pt"> </textarea></form>');
$output = $this->mpdf->Output('', Destination::STRING_RETURN);
$this->assertStringContainsString('/T (test)', $output);
$this->assertStringContainsString('/DA (/F2 10 Tf 0.000 g)', $output);
}
}