refactoring
This commit is contained in:
parent
9b4261ca36
commit
40fd19e3bf
|
@ -31,12 +31,12 @@ use PHPUnit\Framework\TestCase;
|
||||||
include_once __DIR__ . '/../../lib/pdfstruct.inc';
|
include_once __DIR__ . '/../../lib/pdfstruct.inc';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reads a sample PDF structure.
|
* Tests classes in pdfstruct.inc.
|
||||||
*
|
*
|
||||||
* @author Roland Gruber
|
* @author Roland Gruber
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
class ReadStructureTest extends TestCase {
|
class PdfStructTest extends TestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reads the sample structure.
|
* Reads the sample structure.
|
||||||
|
@ -114,14 +114,10 @@ class ReadStructureTest extends TestCase {
|
||||||
$this->assertEquals($originalXML, $xml);
|
$this->assertEquals($originalXML, $xml);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
/**
|
||||||
|
|
||||||
/**
|
|
||||||
* Tests PDFTextSection
|
* Tests PDFTextSection
|
||||||
*/
|
*/
|
||||||
class PDFTextSectionTest extends TestCase {
|
public function testExportPDFTextSection() {
|
||||||
|
|
||||||
public function testExport() {
|
|
||||||
$section = new PDFTextSection('sometext');
|
$section = new PDFTextSection('sometext');
|
||||||
|
|
||||||
$data = $section->export();
|
$data = $section->export();
|
||||||
|
@ -129,14 +125,10 @@ class PDFTextSectionTest extends TestCase {
|
||||||
$this->assertEquals('sometext', $data);
|
$this->assertEquals('sometext', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
/**
|
||||||
|
|
||||||
/**
|
|
||||||
* Tests PDFEntrySection
|
* Tests PDFEntrySection
|
||||||
*/
|
*/
|
||||||
class PDFEntrySectionTest extends TestCase {
|
public function testExportPDFEntrySection() {
|
||||||
|
|
||||||
public function testExport() {
|
|
||||||
$section = new PDFEntrySection('mytitle');
|
$section = new PDFEntrySection('mytitle');
|
||||||
$section->setEntries(array(new PDFSectionEntry('key1'), new PDFSectionEntry('key2')));
|
$section->setEntries(array(new PDFSectionEntry('key1'), new PDFSectionEntry('key2')));
|
||||||
|
|
||||||
|
@ -150,14 +142,10 @@ class PDFEntrySectionTest extends TestCase {
|
||||||
$this->assertEquals($expected, $data);
|
$this->assertEquals($expected, $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
/**
|
||||||
|
|
||||||
/**
|
|
||||||
* Tests PDFStructure
|
* Tests PDFStructure
|
||||||
*/
|
*/
|
||||||
class PDFStructureTest extends TestCase {
|
public function testExportPDFStructure() {
|
||||||
|
|
||||||
public function testExport() {
|
|
||||||
$structure = new PDFStructure();
|
$structure = new PDFStructure();
|
||||||
$structure->setFoldingMarks(PDFStructure::FOLDING_STANDARD);
|
$structure->setFoldingMarks(PDFStructure::FOLDING_STANDARD);
|
||||||
$structure->setLogo('somelogo');
|
$structure->setLogo('somelogo');
|
||||||
|
|
Loading…
Reference in New Issue