PDF converter
* distributed under the OSL-3.0 License
*
* @package Html2pdf
* @author Laurent MINGUET
* @copyright 2017 Laurent MINGUET
*/
namespace Spipu\Html2Pdf\Tests\Exception;
use Spipu\Html2Pdf\Tests\AbstractTest;
/**
* Class DebugTest
*/
class LongSentenceExceptionTest extends AbstractTest
{
/**
* test LongSentence Exception
*
* @return void
* @expectedException \Spipu\Html2Pdf\Exception\LongSentenceException
*/
public function testBug()
{
$sentence = 'This is a sentence.';
$bigSentence = $sentence;
for ($k=0; $k<110; $k++) {
$bigSentence.= ' '.$sentence;
}
$html = ''.$bigSentence.'';
$object = $this->getObject();
$object->setSentenceMaxLines(100);
$object->writeHTML($html);
$object->output('test.pdf', 'S');
}
}