refactoring

This commit is contained in:
Roland Gruber 2020-05-07 21:31:21 +02:00
parent 9b4261ca36
commit 40fd19e3bf
1 changed files with 14 additions and 26 deletions

View File

@ -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 public function testExportPDFTextSection() {
*/
class PDFTextSectionTest extends TestCase {
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 public function testExportPDFEntrySection() {
*/
class PDFEntrySectionTest extends TestCase {
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 public function testExportPDFStructure() {
*/
class PDFStructureTest extends TestCase {
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');