html2pdf mit composer hinzugefügt
This commit is contained in:
40
vendor/spipu/html2pdf/Tests/CrossVersionCompatibility/PhpUnit9/AbstractTestCase.php
vendored
Normal file
40
vendor/spipu/html2pdf/Tests/CrossVersionCompatibility/PhpUnit9/AbstractTestCase.php
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace Spipu\Html2Pdf\Tests\CrossVersionCompatibility\PhpUnit9;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Spipu\Html2Pdf\Html2Pdf;
|
||||
|
||||
abstract class AbstractTestCase extends TestCase
|
||||
{
|
||||
use AssertContains;
|
||||
|
||||
/**
|
||||
* @var Html2Pdf
|
||||
*/
|
||||
protected $html2pdf;
|
||||
|
||||
/**
|
||||
* Executed before each test
|
||||
*/
|
||||
protected function setUp(): void
|
||||
{
|
||||
$this->html2pdf = new Html2Pdf('P', 'A4', 'fr', true, 'UTF-8', [0, 0, 0, 0]);
|
||||
$this->html2pdf->pdf->SetTitle('PhpUnit Test');
|
||||
}
|
||||
|
||||
/**
|
||||
* Executed after each test
|
||||
*/
|
||||
protected function tearDown(): void
|
||||
{
|
||||
$this->html2pdf->clean();
|
||||
$this->html2pdf = null;
|
||||
}
|
||||
|
||||
public function expectExceptionMessage($message, $exception = null): void
|
||||
{
|
||||
// Yes, we ignore $exception
|
||||
parent::expectExceptionMessage($message);
|
||||
}
|
||||
}
|
15
vendor/spipu/html2pdf/Tests/CrossVersionCompatibility/PhpUnit9/AssertContains.php
vendored
Normal file
15
vendor/spipu/html2pdf/Tests/CrossVersionCompatibility/PhpUnit9/AssertContains.php
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace Spipu\Html2Pdf\Tests\CrossVersionCompatibility\PhpUnit9;
|
||||
|
||||
trait AssertContains
|
||||
{
|
||||
public static function assertContains($needle, $haystack, string $message = ''): void
|
||||
{
|
||||
if (is_string($haystack)) {
|
||||
parent::assertStringContainsString($needle, $haystack, $message);
|
||||
} else {
|
||||
parent::assertContains($needle, $haystack, $message);
|
||||
}
|
||||
}
|
||||
}
|
19
vendor/spipu/html2pdf/Tests/CrossVersionCompatibility/PhpUnit9/CssConverterTestCase.php
vendored
Normal file
19
vendor/spipu/html2pdf/Tests/CrossVersionCompatibility/PhpUnit9/CssConverterTestCase.php
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace Spipu\Html2Pdf\Tests\CrossVersionCompatibility\PhpUnit9;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Spipu\Html2Pdf\CssConverter;
|
||||
|
||||
abstract class CssConverterTestCase extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var CssConverter
|
||||
*/
|
||||
protected $cssConverter;
|
||||
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->cssConverter = new CssConverter();
|
||||
}
|
||||
}
|
20
vendor/spipu/html2pdf/Tests/CrossVersionCompatibility/PhpUnit9/ExceptionFormatterTestCase.php
vendored
Normal file
20
vendor/spipu/html2pdf/Tests/CrossVersionCompatibility/PhpUnit9/ExceptionFormatterTestCase.php
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
/**
|
||||
* Html2Pdf Library - Tests
|
||||
*
|
||||
* HTML => PDF converter
|
||||
* distributed under the OSL-3.0 License
|
||||
*
|
||||
* @package Html2pdf
|
||||
* @author Laurent MINGUET <webmaster@html2pdf.fr>
|
||||
* @copyright 2017 Laurent MINGUET
|
||||
*/
|
||||
|
||||
namespace Spipu\Html2Pdf\Tests\CrossVersionCompatibility\PhpUnit9;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
abstract class ExceptionFormatterTestCase extends TestCase
|
||||
{
|
||||
use AssertContains;
|
||||
}
|
39
vendor/spipu/html2pdf/Tests/CrossVersionCompatibility/PhpUnit9/HtmlTestCase.php
vendored
Normal file
39
vendor/spipu/html2pdf/Tests/CrossVersionCompatibility/PhpUnit9/HtmlTestCase.php
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
/**
|
||||
* Html2Pdf Library - Tests
|
||||
*
|
||||
* HTML => PDF converter
|
||||
* distributed under the OSL-3.0 License
|
||||
*
|
||||
* @package Html2pdf
|
||||
* @author Laurent MINGUET <webmaster@html2pdf.fr>
|
||||
* @copyright 2017 Laurent MINGUET
|
||||
*/
|
||||
|
||||
namespace Spipu\Html2Pdf\Tests\CrossVersionCompatibility\PhpUnit9;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Spipu\Html2Pdf\Parsing\Html;
|
||||
|
||||
abstract class HtmlTestCase extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var Html
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
$textParser = $this->getMockBuilder('Spipu\Html2Pdf\Parsing\TextParser')
|
||||
->disableOriginalConstructor()
|
||||
->setMethods(['prepareTxt'])
|
||||
->getMock();
|
||||
|
||||
$textParser
|
||||
->expects($this->any())
|
||||
->method('prepareTxt')
|
||||
->willReturnCallback([$this, 'mockPrepareTxt']);
|
||||
|
||||
$this->object = new Html($textParser);
|
||||
}
|
||||
}
|
24
vendor/spipu/html2pdf/Tests/CrossVersionCompatibility/PhpUnit9/SvgDrawerTestCase.php
vendored
Normal file
24
vendor/spipu/html2pdf/Tests/CrossVersionCompatibility/PhpUnit9/SvgDrawerTestCase.php
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace Spipu\Html2Pdf\Tests\CrossVersionCompatibility\PhpUnit9;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Spipu\Html2Pdf\CssConverter;
|
||||
use Spipu\Html2Pdf\SvgDrawer;
|
||||
|
||||
abstract class SvgDrawerTestCase extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var SvgDrawer
|
||||
*/
|
||||
protected $svgDrawer;
|
||||
|
||||
public function setUp(): void
|
||||
{
|
||||
$myPdf = $this->createMock('Spipu\Html2Pdf\MyPdf');
|
||||
|
||||
$cssConverter = new CssConverter();
|
||||
|
||||
$this->svgDrawer = new SvgDrawer($myPdf, $cssConverter);
|
||||
}
|
||||
}
|
39
vendor/spipu/html2pdf/Tests/CrossVersionCompatibility/PhpUnit9/TagParserTestCase.php
vendored
Normal file
39
vendor/spipu/html2pdf/Tests/CrossVersionCompatibility/PhpUnit9/TagParserTestCase.php
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
/**
|
||||
* Html2Pdf Library - Tests
|
||||
*
|
||||
* HTML => PDF converter
|
||||
* distributed under the OSL-3.0 License
|
||||
*
|
||||
* @package Html2pdf
|
||||
* @author Laurent MINGUET <webmaster@html2pdf.fr>
|
||||
* @copyright 2017 Laurent MINGUET
|
||||
*/
|
||||
|
||||
namespace Spipu\Html2Pdf\Tests\CrossVersionCompatibility\PhpUnit9;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Spipu\Html2Pdf\Parsing\TagParser;
|
||||
|
||||
abstract class TagParserTestCase extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var TagParser
|
||||
*/
|
||||
protected $parser;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
$textParser = $this->getMockBuilder('Spipu\Html2Pdf\Parsing\TextParser')
|
||||
->disableOriginalConstructor()
|
||||
->setMethods(['prepareTxt'])
|
||||
->getMock();
|
||||
|
||||
$textParser
|
||||
->expects($this->any())
|
||||
->method('prepareTxt')
|
||||
->willReturnCallback([$this, 'mockPrepareTxt']);
|
||||
|
||||
$this->parser = new TagParser($textParser);
|
||||
}
|
||||
}
|
29
vendor/spipu/html2pdf/Tests/CrossVersionCompatibility/PhpUnit9/TextParserTestCase.php
vendored
Normal file
29
vendor/spipu/html2pdf/Tests/CrossVersionCompatibility/PhpUnit9/TextParserTestCase.php
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* Html2Pdf Library - Tests
|
||||
*
|
||||
* HTML => PDF converter
|
||||
* distributed under the OSL-3.0 License
|
||||
*
|
||||
* @package Html2pdf
|
||||
* @author Laurent MINGUET <webmaster@html2pdf.fr>
|
||||
* @copyright 2017 Laurent MINGUET
|
||||
*/
|
||||
|
||||
namespace Spipu\Html2Pdf\Tests\CrossVersionCompatibility\PhpUnit9;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Spipu\Html2Pdf\Parsing\TextParser;
|
||||
|
||||
abstract class TextParserTestCase extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var TextParser
|
||||
*/
|
||||
protected $parser;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
$this->parser = new TextParser();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user