Last change
on this file was 347, checked in by roby, 4 years ago |
Aggiornamento per compatibilità con php7.4
|
File size:
1.1 KB
|
Rev | Line | |
---|
[347] | 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\Parsing;
|
---|
| 14 |
|
---|
| 15 | use Spipu\Html2Pdf\Parsing\TextParser;
|
---|
| 16 |
|
---|
| 17 | /**
|
---|
| 18 | * Class TextParserTest
|
---|
| 19 | */
|
---|
| 20 | class TextParserTest extends \PHPUnit_Framework_TestCase
|
---|
| 21 | {
|
---|
| 22 | /**
|
---|
| 23 | * @var TextParser
|
---|
| 24 | */
|
---|
| 25 | private $parser;
|
---|
| 26 |
|
---|
| 27 | protected function setUp()
|
---|
| 28 | {
|
---|
| 29 | $this->parser = new TextParser();
|
---|
| 30 | }
|
---|
| 31 |
|
---|
| 32 | /**
|
---|
| 33 | * Test if it works
|
---|
| 34 | */
|
---|
| 35 | public function testOk()
|
---|
| 36 | {
|
---|
| 37 | $result = $this->parser->prepareTxt('hello world', false);
|
---|
| 38 | $this->assertSame('hello world', $result);
|
---|
| 39 |
|
---|
| 40 | $result = $this->parser->prepareTxt('hello world', true);
|
---|
| 41 | $this->assertSame('hello world', $result);
|
---|
| 42 |
|
---|
| 43 | $result = $this->parser->prepareTxt('hello 10€ world');
|
---|
| 44 | $this->assertSame('hello 10⬠world', $result);
|
---|
| 45 |
|
---|
| 46 | $result = $this->parser->prepareTxt('hello < world');
|
---|
| 47 | $this->assertSame('hello < world', $result);
|
---|
| 48 | }
|
---|
| 49 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.