- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIssue779Test.php
More file actions
41 lines (30 loc) · 848 Bytes
/
Issue779Test.php
File metadata and controls
41 lines (30 loc) · 848 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
<?php
namespace Issues;
use Mockery;
use Mpdf\Log\Context as LogContext;
use Mpdf\Mpdf;
use Mpdf\Output\Destination;
use Psr\Log\NullLogger;
class Issue779Test extends \Mpdf\BaseMpdfTest
{
public function testOffsetsInHtmlTable()
{
$logMock = Mockery::mock(NullLogger::class)->shouldIgnoreMissing();
$logMock->shouldReceive('debug')->twice()
->with('Possible non-wellformed HTML markup in a table', ['context' => LogContext::HTML_MARKUP]);
$this->mpdf->setLogger($logMock);
$html = '<html>
<body>
<table style="page-break-after: always;">
<tbody>
<tr><td class="center" colspan="10" rowspan="3"></td>
</tr>
</tbody>
</table>
</body>
</html>';
$this->mpdf->WriteHTML($html);
$output = $this->mpdf->Output('', Destination::STRING_RETURN);
$this->assertStringStartsWith('%PDF-', $output);
}
}