Last change
on this file since 407 was 347, checked in by roby, 3 years ago |
Aggiornamento per compatibilità con php7.4
|
File size:
1013 bytes
|
Line | |
---|
1 | <?php
|
---|
2 | /**
|
---|
3 | * Html2Pdf Library - Tests
|
---|
4 | *
|
---|
5 | * HTML => PDF converter
|
---|
6 | * distributed under the OSL-3.0 License
|
---|
7 | *
|
---|
8 | * @package Html2pdf
|
---|
9 | * @author Laurent MINGUET <webmaster@html2pdf.fr>
|
---|
10 | * @copyright 2017 Laurent MINGUET
|
---|
11 | */
|
---|
12 |
|
---|
13 | namespace Spipu\Html2Pdf\Tests\Exception;
|
---|
14 |
|
---|
15 | use Spipu\Html2Pdf\Tests\AbstractTest;
|
---|
16 |
|
---|
17 | /**
|
---|
18 | * Class DebugTest
|
---|
19 | */
|
---|
20 | class LongSentenceExceptionTest extends AbstractTest
|
---|
21 | {
|
---|
22 | /**
|
---|
23 | * test LongSentence Exception
|
---|
24 | *
|
---|
25 | * @return void
|
---|
26 | * @expectedException \Spipu\Html2Pdf\Exception\LongSentenceException
|
---|
27 | */
|
---|
28 | public function testBug()
|
---|
29 | {
|
---|
30 | $sentence = 'This is a sentence.';
|
---|
31 | $bigSentence = $sentence;
|
---|
32 | for ($k=0; $k<110; $k++) {
|
---|
33 | $bigSentence.= ' '.$sentence;
|
---|
34 | }
|
---|
35 | $html = '<page backleft="0" backright="200mm"style="font-size: 1mm">'.$bigSentence.'</page>';
|
---|
36 |
|
---|
37 | $object = $this->getObject();
|
---|
38 | $object->setSentenceMaxLines(100);
|
---|
39 | $object->writeHTML($html);
|
---|
40 | $object->output('test.pdf', 'S');
|
---|
41 | }
|
---|
42 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.