diff --git a/tests/testcases/PdfBuilderEn16931Test.php b/tests/testcases/PdfBuilderEn16931Test.php index d53bca4f..67bef475 100644 --- a/tests/testcases/PdfBuilderEn16931Test.php +++ b/tests/testcases/PdfBuilderEn16931Test.php @@ -169,9 +169,33 @@ public function testPdfMetaData(): void $this->assertArrayHasKey("Producer", $pdfDetails); //"FPDF 1.84" $this->assertArrayHasKey("CreationDate", $pdfDetails); //"2020-12-09T05:19:39+00:00" $this->assertArrayHasKey("Pages", $pdfDetails); //"1" + $this->assertArrayHasKey("fx:documenttype", $pdfDetails); + $this->assertArrayHasKey("fx:documentfilename", $pdfDetails); + $this->assertArrayHasKey("fx:version", $pdfDetails); + $this->assertArrayHasKey("fx:conformancelevel", $pdfDetails); + $this->assertArrayHasKey("pdfaid:part", $pdfDetails); + $this->assertArrayHasKey("pdfaid:conformance", $pdfDetails); + $this->assertArrayHasKey("dc:title", $pdfDetails); + $this->assertArrayHasKey("dc:creator", $pdfDetails); + $this->assertArrayHasKey("dc:description", $pdfDetails); + $this->assertArrayHasKey("xmp:creatortool", $pdfDetails); + $this->assertArrayHasKey("xmp:createdate", $pdfDetails); + $this->assertArrayHasKey("xmp:modifydate", $pdfDetails); $this->assertStringContainsString('FPDF', $pdfDetails["Producer"]); $this->assertStringContainsString(date("Y-m-d"), $pdfDetails["CreationDate"]); $this->assertEquals("1", $pdfDetails["Pages"]); + $this->assertEquals("INVOICE", $pdfDetails["fx:documenttype"]); + $this->assertEquals("factur-x.xml", $pdfDetails["fx:documentfilename"]); + $this->assertEquals("1.0", $pdfDetails["fx:version"]); + $this->assertEquals("EN 16931", $pdfDetails["fx:conformancelevel"]); + $this->assertEquals("3", $pdfDetails["pdfaid:part"]); + $this->assertEquals("B", $pdfDetails["pdfaid:conformance"]); + $this->assertEquals("Lieferant GmbH : Invoice 471102", $pdfDetails["dc:title"]); + $this->assertEquals("Lieferant GmbH", $pdfDetails["dc:creator"]); + $this->assertEquals("FacturX/ZUGFeRD Invoice 471102 dated 2018-03-05 issued by Lieferant GmbH", $pdfDetails["dc:description"]); + $this->assertStringContainsString('Factur-X PHP library', $pdfDetails["xmp:creatortool"]); + $this->assertEquals("2018-03-05T00:00:00+00:00", $pdfDetails["xmp:createdate"]); + $this->assertStringContainsString(date("Y-m-d"), $pdfDetails["xmp:modifydate"]); } public function testSetAdditionalCreatorTool(): void