From 31877c64eb6aa75682a0844aba2bf05f1d90a527 Mon Sep 17 00:00:00 2001 From: HorstOeko Date: Tue, 22 Oct 2024 05:33:57 +0200 Subject: [PATCH] Fixed typo in TestCase method --- tests/TestCase.php | 2 +- tests/testcases/BuilderEn16931Test.php | 12 ++++++------ tests/testcases/BuilderExtendedTest.php | 12 ++++++------ tests/testcases/BuilderMinimumTest.php | 12 ++++++------ tests/testcases/DocumentTest.php | 12 ++++++------ .../PdfReaderEn16931AllowanceChargeTest.php | 4 ++-- tests/testcases/PdfReaderEn16931Test.php | 4 ++-- tests/testcases/PdfReaderExtended2Test.php | 4 ++-- tests/testcases/PdfReaderExtendedTest.php | 4 ++-- tests/testcases/PdfReaderMinimumTest.php | 4 ++-- tests/testcases/PdfReaderMultipleAttachmentsTest.php | 4 ++-- tests/testcases/PdfReaderXRechnungTest.php | 4 ++-- tests/testcases/ReaderBasicTest.php | 12 ++++++------ tests/testcases/ReaderEn16931AllowanceChargeTest.php | 12 ++++++------ tests/testcases/ReaderEn16931Bank1Test.php | 12 ++++++------ tests/testcases/ReaderEn16931Bank2Test.php | 4 ++-- tests/testcases/ReaderEn16931Test.php | 12 ++++++------ tests/testcases/ReaderExtended2Test.php | 12 ++++++------ tests/testcases/ReaderExtendedTest.php | 12 ++++++------ .../ReaderXRechnungAttachedBinaryObjectTest.php | 12 ++++++------ tests/testcases/ReaderXRechnungTest.php | 12 ++++++------ tests/testcases/issues/Issue18Test.php | 4 ++-- 22 files changed, 91 insertions(+), 91 deletions(-) diff --git a/tests/TestCase.php b/tests/TestCase.php index 4fb6fe06..54ac05f2 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -114,7 +114,7 @@ public function getPrivateMethodFromObject(object $object, string $methodName): * @param array $args * @return mixed */ - public function invokePivateMethodFromObject($object, string $methodName, ...$args) + public function invokePrivateMethodFromObject($object, string $methodName, ...$args) { $method = $this->getPrivateMethodFromObject($object, $methodName); return $method->invoke($object, ...$args); diff --git a/tests/testcases/BuilderEn16931Test.php b/tests/testcases/BuilderEn16931Test.php index 8520504f..db44440b 100644 --- a/tests/testcases/BuilderEn16931Test.php +++ b/tests/testcases/BuilderEn16931Test.php @@ -27,12 +27,12 @@ public function testDocumentProfile(): void public function testDocumentGetters(): void { - $this->assertNotNull($this->invokePivateMethodFromObject(self::$document, 'getInvoiceObject')); - $this->assertEquals('horstoeko\zugferd\entities\en16931\rsm\CrossIndustryInvoice', get_class($this->invokePivateMethodFromObject(self::$document, 'getInvoiceObject'))); - $this->assertNotNull($this->invokePivateMethodFromObject(self::$document, 'getSerializer')); - $this->assertEquals('JMS\Serializer\Serializer', get_class($this->invokePivateMethodFromObject(self::$document, 'getSerializer'))); - $this->assertNotNull($this->invokePivateMethodFromObject(self::$document, 'getObjectHelper')); - $this->assertEquals('horstoeko\zugferd\ZugferdObjectHelper', get_class($this->invokePivateMethodFromObject(self::$document, 'getObjectHelper'))); + $this->assertNotNull($this->invokePrivateMethodFromObject(self::$document, 'getInvoiceObject')); + $this->assertEquals('horstoeko\zugferd\entities\en16931\rsm\CrossIndustryInvoice', get_class($this->invokePrivateMethodFromObject(self::$document, 'getInvoiceObject'))); + $this->assertNotNull($this->invokePrivateMethodFromObject(self::$document, 'getSerializer')); + $this->assertEquals('JMS\Serializer\Serializer', get_class($this->invokePrivateMethodFromObject(self::$document, 'getSerializer'))); + $this->assertNotNull($this->invokePrivateMethodFromObject(self::$document, 'getObjectHelper')); + $this->assertEquals('horstoeko\zugferd\ZugferdObjectHelper', get_class($this->invokePrivateMethodFromObject(self::$document, 'getObjectHelper'))); $this->assertEquals('en16931', self::$document->getProfileDefinitionParameter('name')); $this->assertEquals('EN 16931 (COMFORT)', self::$document->getProfileDefinitionParameter('altname')); $this->assertEquals('urn:cen.eu:en16931:2017', self::$document->getProfileDefinitionParameter('contextparameter')); diff --git a/tests/testcases/BuilderExtendedTest.php b/tests/testcases/BuilderExtendedTest.php index d37f1583..f2f3594b 100644 --- a/tests/testcases/BuilderExtendedTest.php +++ b/tests/testcases/BuilderExtendedTest.php @@ -27,12 +27,12 @@ public function testDocumentProfile(): void public function testDocumentGetters(): void { - $this->assertNotNull($this->invokePivateMethodFromObject(self::$document, 'getInvoiceObject')); - $this->assertEquals('horstoeko\zugferd\entities\extended\rsm\CrossIndustryInvoice', get_class($this->invokePivateMethodFromObject(self::$document, 'getInvoiceObject'))); - $this->assertNotNull($this->invokePivateMethodFromObject(self::$document, 'getSerializer')); - $this->assertEquals('JMS\Serializer\Serializer', get_class($this->invokePivateMethodFromObject(self::$document, 'getSerializer'))); - $this->assertNotNull($this->invokePivateMethodFromObject(self::$document, 'getObjectHelper')); - $this->assertEquals('horstoeko\zugferd\ZugferdObjectHelper', get_class($this->invokePivateMethodFromObject(self::$document, 'getObjectHelper'))); + $this->assertNotNull($this->invokePrivateMethodFromObject(self::$document, 'getInvoiceObject')); + $this->assertEquals('horstoeko\zugferd\entities\extended\rsm\CrossIndustryInvoice', get_class($this->invokePrivateMethodFromObject(self::$document, 'getInvoiceObject'))); + $this->assertNotNull($this->invokePrivateMethodFromObject(self::$document, 'getSerializer')); + $this->assertEquals('JMS\Serializer\Serializer', get_class($this->invokePrivateMethodFromObject(self::$document, 'getSerializer'))); + $this->assertNotNull($this->invokePrivateMethodFromObject(self::$document, 'getObjectHelper')); + $this->assertEquals('horstoeko\zugferd\ZugferdObjectHelper', get_class($this->invokePrivateMethodFromObject(self::$document, 'getObjectHelper'))); $this->assertEquals('extended', self::$document->getProfileDefinitionParameter('name')); $this->assertEquals('EXTENDED', self::$document->getProfileDefinitionParameter('altname')); $this->assertEquals('urn:cen.eu:en16931:2017#conformant#urn:factur-x.eu:1p0:extended', self::$document->getProfileDefinitionParameter('contextparameter')); diff --git a/tests/testcases/BuilderMinimumTest.php b/tests/testcases/BuilderMinimumTest.php index 977ecd73..51696f72 100644 --- a/tests/testcases/BuilderMinimumTest.php +++ b/tests/testcases/BuilderMinimumTest.php @@ -28,12 +28,12 @@ public function testDocumentProfile(): void public function testDocumentGetters(): void { - $this->assertNotNull($this->invokePivateMethodFromObject(self::$document, 'getInvoiceObject')); - $this->assertEquals('horstoeko\zugferd\entities\minimum\rsm\CrossIndustryInvoice', get_class($this->invokePivateMethodFromObject(self::$document, 'getInvoiceObject'))); - $this->assertNotNull($this->invokePivateMethodFromObject(self::$document, 'getSerializer')); - $this->assertEquals('JMS\Serializer\Serializer', get_class($this->invokePivateMethodFromObject(self::$document, 'getSerializer'))); - $this->assertNotNull($this->invokePivateMethodFromObject(self::$document, 'getObjectHelper')); - $this->assertEquals('horstoeko\zugferd\ZugferdObjectHelper', get_class($this->invokePivateMethodFromObject(self::$document, 'getObjectHelper'))); + $this->assertNotNull($this->invokePrivateMethodFromObject(self::$document, 'getInvoiceObject')); + $this->assertEquals('horstoeko\zugferd\entities\minimum\rsm\CrossIndustryInvoice', get_class($this->invokePrivateMethodFromObject(self::$document, 'getInvoiceObject'))); + $this->assertNotNull($this->invokePrivateMethodFromObject(self::$document, 'getSerializer')); + $this->assertEquals('JMS\Serializer\Serializer', get_class($this->invokePrivateMethodFromObject(self::$document, 'getSerializer'))); + $this->assertNotNull($this->invokePrivateMethodFromObject(self::$document, 'getObjectHelper')); + $this->assertEquals('horstoeko\zugferd\ZugferdObjectHelper', get_class($this->invokePrivateMethodFromObject(self::$document, 'getObjectHelper'))); $this->assertEquals('minimum', self::$document->getProfileDefinitionParameter('name')); $this->assertEquals('MINIMUM', self::$document->getProfileDefinitionParameter('altname')); $this->assertEquals('urn:factur-x.eu:1p0:minimum', self::$document->getProfileDefinitionParameter('contextparameter')); diff --git a/tests/testcases/DocumentTest.php b/tests/testcases/DocumentTest.php index a1934efb..7b3c9741 100644 --- a/tests/testcases/DocumentTest.php +++ b/tests/testcases/DocumentTest.php @@ -82,12 +82,12 @@ public function testDocumentGetters(): void { $doc = ZugferdDocumentBuilder::createNew(ZugferdProfiles::PROFILE_EXTENDED); - $this->assertNotNull($this->invokePivateMethodFromObject($doc, 'getInvoiceObject')); - $this->assertEquals('horstoeko\zugferd\entities\extended\rsm\CrossIndustryInvoice', get_class($this->invokePivateMethodFromObject($doc, 'getInvoiceObject'))); - $this->assertNotNull($this->invokePivateMethodFromObject($doc, 'getSerializer')); - $this->assertEquals('JMS\Serializer\Serializer', get_class($this->invokePivateMethodFromObject($doc, 'getSerializer'))); - $this->assertNotNull($this->invokePivateMethodFromObject($doc, 'getObjectHelper')); - $this->assertEquals('horstoeko\zugferd\ZugferdObjectHelper', get_class($this->invokePivateMethodFromObject($doc, 'getObjectHelper'))); + $this->assertNotNull($this->invokePrivateMethodFromObject($doc, 'getInvoiceObject')); + $this->assertEquals('horstoeko\zugferd\entities\extended\rsm\CrossIndustryInvoice', get_class($this->invokePrivateMethodFromObject($doc, 'getInvoiceObject'))); + $this->assertNotNull($this->invokePrivateMethodFromObject($doc, 'getSerializer')); + $this->assertEquals('JMS\Serializer\Serializer', get_class($this->invokePrivateMethodFromObject($doc, 'getSerializer'))); + $this->assertNotNull($this->invokePrivateMethodFromObject($doc, 'getObjectHelper')); + $this->assertEquals('horstoeko\zugferd\ZugferdObjectHelper', get_class($this->invokePrivateMethodFromObject($doc, 'getObjectHelper'))); } /** diff --git a/tests/testcases/PdfReaderEn16931AllowanceChargeTest.php b/tests/testcases/PdfReaderEn16931AllowanceChargeTest.php index 311e0d03..31f4b04a 100644 --- a/tests/testcases/PdfReaderEn16931AllowanceChargeTest.php +++ b/tests/testcases/PdfReaderEn16931AllowanceChargeTest.php @@ -42,8 +42,8 @@ public function testDocumentGenerals(): void $this->assertEquals("", $documentname); $this->assertEquals("", $documentlanguage); $this->assertNull($effectiveSpecifiedPeriod); - $this->assertNotNull($this->invokePivateMethodFromObject(self::$document, 'getInvoiceObject')); - $this->assertEquals('horstoeko\zugferd\entities\en16931\rsm\CrossIndustryInvoice', get_class($this->invokePivateMethodFromObject(self::$document, 'getInvoiceObject'))); + $this->assertNotNull($this->invokePrivateMethodFromObject(self::$document, 'getInvoiceObject')); + $this->assertEquals('horstoeko\zugferd\entities\en16931\rsm\CrossIndustryInvoice', get_class($this->invokePrivateMethodFromObject(self::$document, 'getInvoiceObject'))); } public function testDocumentNotes(): void diff --git a/tests/testcases/PdfReaderEn16931Test.php b/tests/testcases/PdfReaderEn16931Test.php index 656800f6..65a75f86 100644 --- a/tests/testcases/PdfReaderEn16931Test.php +++ b/tests/testcases/PdfReaderEn16931Test.php @@ -42,8 +42,8 @@ public function testDocumentGenerals(): void $this->assertEquals("", $documentname); $this->assertEquals("", $documentlanguage); $this->assertNull($effectiveSpecifiedPeriod); - $this->assertNotNull($this->invokePivateMethodFromObject(self::$document, 'getInvoiceObject')); - $this->assertEquals('horstoeko\zugferd\entities\en16931\rsm\CrossIndustryInvoice', get_class($this->invokePivateMethodFromObject(self::$document, 'getInvoiceObject'))); + $this->assertNotNull($this->invokePrivateMethodFromObject(self::$document, 'getInvoiceObject')); + $this->assertEquals('horstoeko\zugferd\entities\en16931\rsm\CrossIndustryInvoice', get_class($this->invokePrivateMethodFromObject(self::$document, 'getInvoiceObject'))); } public function testDocumentNotes(): void diff --git a/tests/testcases/PdfReaderExtended2Test.php b/tests/testcases/PdfReaderExtended2Test.php index b35e0d79..3a031898 100644 --- a/tests/testcases/PdfReaderExtended2Test.php +++ b/tests/testcases/PdfReaderExtended2Test.php @@ -41,8 +41,8 @@ public function testDocumentGenerals(): void $this->assertEquals("", $documentname); $this->assertEquals("", $documentlanguage); $this->assertNull($effectiveSpecifiedPeriod); - $this->assertNotNull($this->invokePivateMethodFromObject(self::$document, 'getInvoiceObject')); - $this->assertEquals('horstoeko\zugferd\entities\extended\rsm\CrossIndustryInvoice', get_class($this->invokePivateMethodFromObject(self::$document, 'getInvoiceObject'))); + $this->assertNotNull($this->invokePrivateMethodFromObject(self::$document, 'getInvoiceObject')); + $this->assertEquals('horstoeko\zugferd\entities\extended\rsm\CrossIndustryInvoice', get_class($this->invokePrivateMethodFromObject(self::$document, 'getInvoiceObject'))); } public function testDocumentNotes(): void diff --git a/tests/testcases/PdfReaderExtendedTest.php b/tests/testcases/PdfReaderExtendedTest.php index 5b515830..ead88939 100644 --- a/tests/testcases/PdfReaderExtendedTest.php +++ b/tests/testcases/PdfReaderExtendedTest.php @@ -42,8 +42,8 @@ public function testDocumentGenerals(): void $this->assertEquals("KOSTENRECHNUNG", $documentname); $this->assertEquals("", $documentlanguage); $this->assertNull($effectiveSpecifiedPeriod); - $this->assertNotNull($this->invokePivateMethodFromObject(self::$document, 'getInvoiceObject')); - $this->assertEquals('horstoeko\zugferd\entities\extended\rsm\CrossIndustryInvoice', get_class($this->invokePivateMethodFromObject(self::$document, 'getInvoiceObject'))); + $this->assertNotNull($this->invokePrivateMethodFromObject(self::$document, 'getInvoiceObject')); + $this->assertEquals('horstoeko\zugferd\entities\extended\rsm\CrossIndustryInvoice', get_class($this->invokePrivateMethodFromObject(self::$document, 'getInvoiceObject'))); } public function testDocumentNotes(): void diff --git a/tests/testcases/PdfReaderMinimumTest.php b/tests/testcases/PdfReaderMinimumTest.php index 86f02f62..f1466196 100644 --- a/tests/testcases/PdfReaderMinimumTest.php +++ b/tests/testcases/PdfReaderMinimumTest.php @@ -43,8 +43,8 @@ public function testDocumentGenerals(): void $this->assertEquals("", $documentname); $this->assertEquals("", $documentlanguage); $this->assertNull($effectiveSpecifiedPeriod); - $this->assertNotNull($this->invokePivateMethodFromObject(self::$document, 'getInvoiceObject')); - $this->assertEquals('horstoeko\zugferd\entities\minimum\rsm\CrossIndustryInvoice', get_class($this->invokePivateMethodFromObject(self::$document, 'getInvoiceObject'))); + $this->assertNotNull($this->invokePrivateMethodFromObject(self::$document, 'getInvoiceObject')); + $this->assertEquals('horstoeko\zugferd\entities\minimum\rsm\CrossIndustryInvoice', get_class($this->invokePrivateMethodFromObject(self::$document, 'getInvoiceObject'))); } public function testDocumentNotes(): void diff --git a/tests/testcases/PdfReaderMultipleAttachmentsTest.php b/tests/testcases/PdfReaderMultipleAttachmentsTest.php index 47481259..7a5306ca 100644 --- a/tests/testcases/PdfReaderMultipleAttachmentsTest.php +++ b/tests/testcases/PdfReaderMultipleAttachmentsTest.php @@ -41,7 +41,7 @@ public function testDocumentGenerals(): void $this->assertEquals("", $documentname); $this->assertEquals("", $documentlanguage); $this->assertNull($effectiveSpecifiedPeriod); - $this->assertNotNull($this->invokePivateMethodFromObject(self::$document, 'getInvoiceObject')); - $this->assertEquals('horstoeko\zugferd\entities\en16931\rsm\CrossIndustryInvoice', get_class($this->invokePivateMethodFromObject(self::$document, 'getInvoiceObject'))); + $this->assertNotNull($this->invokePrivateMethodFromObject(self::$document, 'getInvoiceObject')); + $this->assertEquals('horstoeko\zugferd\entities\en16931\rsm\CrossIndustryInvoice', get_class($this->invokePrivateMethodFromObject(self::$document, 'getInvoiceObject'))); } } diff --git a/tests/testcases/PdfReaderXRechnungTest.php b/tests/testcases/PdfReaderXRechnungTest.php index fb14c733..a1cd2856 100644 --- a/tests/testcases/PdfReaderXRechnungTest.php +++ b/tests/testcases/PdfReaderXRechnungTest.php @@ -42,8 +42,8 @@ public function testDocumentGenerals(): void $this->assertEquals("", $documentname); $this->assertEquals("", $documentlanguage); $this->assertNull($effectiveSpecifiedPeriod); - $this->assertNotNull($this->invokePivateMethodFromObject(self::$document, 'getInvoiceObject')); - $this->assertEquals('horstoeko\zugferd\entities\en16931\rsm\CrossIndustryInvoice', get_class($this->invokePivateMethodFromObject(self::$document, 'getInvoiceObject'))); + $this->assertNotNull($this->invokePrivateMethodFromObject(self::$document, 'getInvoiceObject')); + $this->assertEquals('horstoeko\zugferd\entities\en16931\rsm\CrossIndustryInvoice', get_class($this->invokePrivateMethodFromObject(self::$document, 'getInvoiceObject'))); } public function testDocumentNotes(): void diff --git a/tests/testcases/ReaderBasicTest.php b/tests/testcases/ReaderBasicTest.php index e0673cb7..ec868012 100644 --- a/tests/testcases/ReaderBasicTest.php +++ b/tests/testcases/ReaderBasicTest.php @@ -29,12 +29,12 @@ public function testDocumentProfile(): void public function testDocumentGetters(): void { - $this->assertNotNull($this->invokePivateMethodFromObject(self::$document, 'getInvoiceObject')); - $this->assertEquals('horstoeko\zugferd\entities\basic\rsm\CrossIndustryInvoice', get_class($this->invokePivateMethodFromObject(self::$document, 'getInvoiceObject'))); - $this->assertNotNull($this->invokePivateMethodFromObject(self::$document, 'getSerializer')); - $this->assertEquals('JMS\Serializer\Serializer', get_class($this->invokePivateMethodFromObject(self::$document, 'getSerializer'))); - $this->assertNotNull($this->invokePivateMethodFromObject(self::$document, 'getObjectHelper')); - $this->assertEquals('horstoeko\zugferd\ZugferdObjectHelper', get_class($this->invokePivateMethodFromObject(self::$document, 'getObjectHelper'))); + $this->assertNotNull($this->invokePrivateMethodFromObject(self::$document, 'getInvoiceObject')); + $this->assertEquals('horstoeko\zugferd\entities\basic\rsm\CrossIndustryInvoice', get_class($this->invokePrivateMethodFromObject(self::$document, 'getInvoiceObject'))); + $this->assertNotNull($this->invokePrivateMethodFromObject(self::$document, 'getSerializer')); + $this->assertEquals('JMS\Serializer\Serializer', get_class($this->invokePrivateMethodFromObject(self::$document, 'getSerializer'))); + $this->assertNotNull($this->invokePrivateMethodFromObject(self::$document, 'getObjectHelper')); + $this->assertEquals('horstoeko\zugferd\ZugferdObjectHelper', get_class($this->invokePrivateMethodFromObject(self::$document, 'getObjectHelper'))); $this->assertEquals('basic', self::$document->getProfileDefinitionParameter('name')); $this->assertEquals('BASIC', self::$document->getProfileDefinitionParameter('altname')); $this->assertEquals('urn:cen.eu:en16931:2017#compliant#urn:factur-x.eu:1p0:basic', self::$document->getProfileDefinitionParameter('contextparameter')); diff --git a/tests/testcases/ReaderEn16931AllowanceChargeTest.php b/tests/testcases/ReaderEn16931AllowanceChargeTest.php index d059221a..14698148 100644 --- a/tests/testcases/ReaderEn16931AllowanceChargeTest.php +++ b/tests/testcases/ReaderEn16931AllowanceChargeTest.php @@ -29,12 +29,12 @@ public function testDocumentProfile(): void public function testDocumentGetters(): void { - $this->assertNotNull($this->invokePivateMethodFromObject(self::$document, 'getInvoiceObject')); - $this->assertEquals('horstoeko\zugferd\entities\en16931\rsm\CrossIndustryInvoice', get_class($this->invokePivateMethodFromObject(self::$document, 'getInvoiceObject'))); - $this->assertNotNull($this->invokePivateMethodFromObject(self::$document, 'getSerializer')); - $this->assertEquals('JMS\Serializer\Serializer', get_class($this->invokePivateMethodFromObject(self::$document, 'getSerializer'))); - $this->assertNotNull($this->invokePivateMethodFromObject(self::$document, 'getObjectHelper')); - $this->assertEquals('horstoeko\zugferd\ZugferdObjectHelper', get_class($this->invokePivateMethodFromObject(self::$document, 'getObjectHelper'))); + $this->assertNotNull($this->invokePrivateMethodFromObject(self::$document, 'getInvoiceObject')); + $this->assertEquals('horstoeko\zugferd\entities\en16931\rsm\CrossIndustryInvoice', get_class($this->invokePrivateMethodFromObject(self::$document, 'getInvoiceObject'))); + $this->assertNotNull($this->invokePrivateMethodFromObject(self::$document, 'getSerializer')); + $this->assertEquals('JMS\Serializer\Serializer', get_class($this->invokePrivateMethodFromObject(self::$document, 'getSerializer'))); + $this->assertNotNull($this->invokePrivateMethodFromObject(self::$document, 'getObjectHelper')); + $this->assertEquals('horstoeko\zugferd\ZugferdObjectHelper', get_class($this->invokePrivateMethodFromObject(self::$document, 'getObjectHelper'))); $this->assertEquals('en16931', self::$document->getProfileDefinitionParameter('name')); $this->assertEquals('EN 16931 (COMFORT)', self::$document->getProfileDefinitionParameter('altname')); $this->assertEquals('urn:cen.eu:en16931:2017', self::$document->getProfileDefinitionParameter('contextparameter')); diff --git a/tests/testcases/ReaderEn16931Bank1Test.php b/tests/testcases/ReaderEn16931Bank1Test.php index d3fcf3d1..7d291266 100644 --- a/tests/testcases/ReaderEn16931Bank1Test.php +++ b/tests/testcases/ReaderEn16931Bank1Test.php @@ -30,12 +30,12 @@ public function testDocumentProfile(): void public function testDocumentGetters(): void { - $this->assertNotNull($this->invokePivateMethodFromObject(self::$document, 'getInvoiceObject')); - $this->assertEquals('horstoeko\zugferd\entities\en16931\rsm\CrossIndustryInvoice', get_class($this->invokePivateMethodFromObject(self::$document, 'getInvoiceObject'))); - $this->assertNotNull($this->invokePivateMethodFromObject(self::$document, 'getSerializer')); - $this->assertEquals('JMS\Serializer\Serializer', get_class($this->invokePivateMethodFromObject(self::$document, 'getSerializer'))); - $this->assertNotNull($this->invokePivateMethodFromObject(self::$document, 'getObjectHelper')); - $this->assertEquals('horstoeko\zugferd\ZugferdObjectHelper', get_class($this->invokePivateMethodFromObject(self::$document, 'getObjectHelper'))); + $this->assertNotNull($this->invokePrivateMethodFromObject(self::$document, 'getInvoiceObject')); + $this->assertEquals('horstoeko\zugferd\entities\en16931\rsm\CrossIndustryInvoice', get_class($this->invokePrivateMethodFromObject(self::$document, 'getInvoiceObject'))); + $this->assertNotNull($this->invokePrivateMethodFromObject(self::$document, 'getSerializer')); + $this->assertEquals('JMS\Serializer\Serializer', get_class($this->invokePrivateMethodFromObject(self::$document, 'getSerializer'))); + $this->assertNotNull($this->invokePrivateMethodFromObject(self::$document, 'getObjectHelper')); + $this->assertEquals('horstoeko\zugferd\ZugferdObjectHelper', get_class($this->invokePrivateMethodFromObject(self::$document, 'getObjectHelper'))); $this->assertEquals('en16931', self::$document->getProfileDefinitionParameter('name')); $this->assertEquals('EN 16931 (COMFORT)', self::$document->getProfileDefinitionParameter('altname')); $this->assertEquals('urn:cen.eu:en16931:2017', self::$document->getProfileDefinitionParameter('contextparameter')); diff --git a/tests/testcases/ReaderEn16931Bank2Test.php b/tests/testcases/ReaderEn16931Bank2Test.php index dbc625a9..db050ecc 100644 --- a/tests/testcases/ReaderEn16931Bank2Test.php +++ b/tests/testcases/ReaderEn16931Bank2Test.php @@ -40,8 +40,8 @@ public function testDocumentGenerals(): void $this->assertEquals("", $documentname); $this->assertEquals("", $documentlanguage); $this->assertNull($effectiveSpecifiedPeriod); - $this->assertNotNull($this->invokePivateMethodFromObject(self::$document, 'getInvoiceObject')); - $this->assertEquals('horstoeko\zugferd\entities\en16931\rsm\CrossIndustryInvoice', get_class($this->invokePivateMethodFromObject(self::$document, 'getInvoiceObject'))); + $this->assertNotNull($this->invokePrivateMethodFromObject(self::$document, 'getInvoiceObject')); + $this->assertEquals('horstoeko\zugferd\entities\en16931\rsm\CrossIndustryInvoice', get_class($this->invokePrivateMethodFromObject(self::$document, 'getInvoiceObject'))); } public function testDocumentPaymentMeansLoop(): void diff --git a/tests/testcases/ReaderEn16931Test.php b/tests/testcases/ReaderEn16931Test.php index 95a95165..2c8618be 100644 --- a/tests/testcases/ReaderEn16931Test.php +++ b/tests/testcases/ReaderEn16931Test.php @@ -29,12 +29,12 @@ public function testDocumentProfile(): void public function testDocumentGetters(): void { - $this->assertNotNull($this->invokePivateMethodFromObject(self::$document, 'getInvoiceObject')); - $this->assertEquals('horstoeko\zugferd\entities\en16931\rsm\CrossIndustryInvoice', get_class($this->invokePivateMethodFromObject(self::$document, 'getInvoiceObject'))); - $this->assertNotNull($this->invokePivateMethodFromObject(self::$document, 'getSerializer')); - $this->assertEquals('JMS\Serializer\Serializer', get_class($this->invokePivateMethodFromObject(self::$document, 'getSerializer'))); - $this->assertNotNull($this->invokePivateMethodFromObject(self::$document, 'getObjectHelper')); - $this->assertEquals('horstoeko\zugferd\ZugferdObjectHelper', get_class($this->invokePivateMethodFromObject(self::$document, 'getObjectHelper'))); + $this->assertNotNull($this->invokePrivateMethodFromObject(self::$document, 'getInvoiceObject')); + $this->assertEquals('horstoeko\zugferd\entities\en16931\rsm\CrossIndustryInvoice', get_class($this->invokePrivateMethodFromObject(self::$document, 'getInvoiceObject'))); + $this->assertNotNull($this->invokePrivateMethodFromObject(self::$document, 'getSerializer')); + $this->assertEquals('JMS\Serializer\Serializer', get_class($this->invokePrivateMethodFromObject(self::$document, 'getSerializer'))); + $this->assertNotNull($this->invokePrivateMethodFromObject(self::$document, 'getObjectHelper')); + $this->assertEquals('horstoeko\zugferd\ZugferdObjectHelper', get_class($this->invokePrivateMethodFromObject(self::$document, 'getObjectHelper'))); $this->assertEquals('en16931', self::$document->getProfileDefinitionParameter('name')); $this->assertEquals('EN 16931 (COMFORT)', self::$document->getProfileDefinitionParameter('altname')); $this->assertEquals('urn:cen.eu:en16931:2017', self::$document->getProfileDefinitionParameter('contextparameter')); diff --git a/tests/testcases/ReaderExtended2Test.php b/tests/testcases/ReaderExtended2Test.php index 8837bc80..73501e8e 100644 --- a/tests/testcases/ReaderExtended2Test.php +++ b/tests/testcases/ReaderExtended2Test.php @@ -29,12 +29,12 @@ public function testDocumentProfile(): void public function testDocumentGetters(): void { - $this->assertNotNull($this->invokePivateMethodFromObject(self::$document, 'getInvoiceObject')); - $this->assertEquals('horstoeko\zugferd\entities\extended\rsm\CrossIndustryInvoice', get_class($this->invokePivateMethodFromObject(self::$document, 'getInvoiceObject'))); - $this->assertNotNull($this->invokePivateMethodFromObject(self::$document, 'getSerializer')); - $this->assertEquals('JMS\Serializer\Serializer', get_class($this->invokePivateMethodFromObject(self::$document, 'getSerializer'))); - $this->assertNotNull($this->invokePivateMethodFromObject(self::$document, 'getObjectHelper')); - $this->assertEquals('horstoeko\zugferd\ZugferdObjectHelper', get_class($this->invokePivateMethodFromObject(self::$document, 'getObjectHelper'))); + $this->assertNotNull($this->invokePrivateMethodFromObject(self::$document, 'getInvoiceObject')); + $this->assertEquals('horstoeko\zugferd\entities\extended\rsm\CrossIndustryInvoice', get_class($this->invokePrivateMethodFromObject(self::$document, 'getInvoiceObject'))); + $this->assertNotNull($this->invokePrivateMethodFromObject(self::$document, 'getSerializer')); + $this->assertEquals('JMS\Serializer\Serializer', get_class($this->invokePrivateMethodFromObject(self::$document, 'getSerializer'))); + $this->assertNotNull($this->invokePrivateMethodFromObject(self::$document, 'getObjectHelper')); + $this->assertEquals('horstoeko\zugferd\ZugferdObjectHelper', get_class($this->invokePrivateMethodFromObject(self::$document, 'getObjectHelper'))); $this->assertEquals('extended', self::$document->getProfileDefinitionParameter('name')); $this->assertEquals('EXTENDED', self::$document->getProfileDefinitionParameter('altname')); $this->assertEquals('urn:cen.eu:en16931:2017#conformant#urn:factur-x.eu:1p0:extended', self::$document->getProfileDefinitionParameter('contextparameter')); diff --git a/tests/testcases/ReaderExtendedTest.php b/tests/testcases/ReaderExtendedTest.php index 906efb2b..ec67e8ec 100644 --- a/tests/testcases/ReaderExtendedTest.php +++ b/tests/testcases/ReaderExtendedTest.php @@ -29,12 +29,12 @@ public function testDocumentProfile(): void public function testDocumentGetters(): void { - $this->assertNotNull($this->invokePivateMethodFromObject(self::$document, 'getInvoiceObject')); - $this->assertEquals('horstoeko\zugferd\entities\extended\rsm\CrossIndustryInvoice', get_class($this->invokePivateMethodFromObject(self::$document, 'getInvoiceObject'))); - $this->assertNotNull($this->invokePivateMethodFromObject(self::$document, 'getSerializer')); - $this->assertEquals('JMS\Serializer\Serializer', get_class($this->invokePivateMethodFromObject(self::$document, 'getSerializer'))); - $this->assertNotNull($this->invokePivateMethodFromObject(self::$document, 'getObjectHelper')); - $this->assertEquals('horstoeko\zugferd\ZugferdObjectHelper', get_class($this->invokePivateMethodFromObject(self::$document, 'getObjectHelper'))); + $this->assertNotNull($this->invokePrivateMethodFromObject(self::$document, 'getInvoiceObject')); + $this->assertEquals('horstoeko\zugferd\entities\extended\rsm\CrossIndustryInvoice', get_class($this->invokePrivateMethodFromObject(self::$document, 'getInvoiceObject'))); + $this->assertNotNull($this->invokePrivateMethodFromObject(self::$document, 'getSerializer')); + $this->assertEquals('JMS\Serializer\Serializer', get_class($this->invokePrivateMethodFromObject(self::$document, 'getSerializer'))); + $this->assertNotNull($this->invokePrivateMethodFromObject(self::$document, 'getObjectHelper')); + $this->assertEquals('horstoeko\zugferd\ZugferdObjectHelper', get_class($this->invokePrivateMethodFromObject(self::$document, 'getObjectHelper'))); $this->assertEquals('extended', self::$document->getProfileDefinitionParameter('name')); $this->assertEquals('EXTENDED', self::$document->getProfileDefinitionParameter('altname')); $this->assertEquals('urn:cen.eu:en16931:2017#conformant#urn:factur-x.eu:1p0:extended', self::$document->getProfileDefinitionParameter('contextparameter')); diff --git a/tests/testcases/ReaderXRechnungAttachedBinaryObjectTest.php b/tests/testcases/ReaderXRechnungAttachedBinaryObjectTest.php index 24d3ff72..329ccd15 100644 --- a/tests/testcases/ReaderXRechnungAttachedBinaryObjectTest.php +++ b/tests/testcases/ReaderXRechnungAttachedBinaryObjectTest.php @@ -31,12 +31,12 @@ public function testDocumentProfile(): void public function testDocumentGetters(): void { - $this->assertNotNull($this->invokePivateMethodFromObject(self::$document, 'getInvoiceObject')); - $this->assertEquals('horstoeko\zugferd\entities\en16931\rsm\CrossIndustryInvoice', get_class($this->invokePivateMethodFromObject(self::$document, 'getInvoiceObject'))); - $this->assertNotNull($this->invokePivateMethodFromObject(self::$document, 'getSerializer')); - $this->assertEquals('JMS\Serializer\Serializer', get_class($this->invokePivateMethodFromObject(self::$document, 'getSerializer'))); - $this->assertNotNull($this->invokePivateMethodFromObject(self::$document, 'getObjectHelper')); - $this->assertEquals('horstoeko\zugferd\ZugferdObjectHelper', get_class($this->invokePivateMethodFromObject(self::$document, 'getObjectHelper'))); + $this->assertNotNull($this->invokePrivateMethodFromObject(self::$document, 'getInvoiceObject')); + $this->assertEquals('horstoeko\zugferd\entities\en16931\rsm\CrossIndustryInvoice', get_class($this->invokePrivateMethodFromObject(self::$document, 'getInvoiceObject'))); + $this->assertNotNull($this->invokePrivateMethodFromObject(self::$document, 'getSerializer')); + $this->assertEquals('JMS\Serializer\Serializer', get_class($this->invokePrivateMethodFromObject(self::$document, 'getSerializer'))); + $this->assertNotNull($this->invokePrivateMethodFromObject(self::$document, 'getObjectHelper')); + $this->assertEquals('horstoeko\zugferd\ZugferdObjectHelper', get_class($this->invokePrivateMethodFromObject(self::$document, 'getObjectHelper'))); $this->assertEquals('en16931', self::$document->getProfileDefinitionParameter('name')); $this->assertEquals('XRECHNUNG', self::$document->getProfileDefinitionParameter('altname')); $this->assertEquals('urn:cen.eu:en16931:2017#compliant#urn:xoev-de:kosit:standard:xrechnung_2.0', self::$document->getProfileDefinitionParameter('contextparameter')); diff --git a/tests/testcases/ReaderXRechnungTest.php b/tests/testcases/ReaderXRechnungTest.php index e23ce3cb..0a6b963e 100644 --- a/tests/testcases/ReaderXRechnungTest.php +++ b/tests/testcases/ReaderXRechnungTest.php @@ -30,12 +30,12 @@ public function testDocumentProfile(): void public function testDocumentGetters(): void { - $this->assertNotNull($this->invokePivateMethodFromObject(self::$document, 'getInvoiceObject')); - $this->assertEquals('horstoeko\zugferd\entities\en16931\rsm\CrossIndustryInvoice', get_class($this->invokePivateMethodFromObject(self::$document, 'getInvoiceObject'))); - $this->assertNotNull($this->invokePivateMethodFromObject(self::$document, 'getSerializer')); - $this->assertEquals('JMS\Serializer\Serializer', get_class($this->invokePivateMethodFromObject(self::$document, 'getSerializer'))); - $this->assertNotNull($this->invokePivateMethodFromObject(self::$document, 'getObjectHelper')); - $this->assertEquals('horstoeko\zugferd\ZugferdObjectHelper', get_class($this->invokePivateMethodFromObject(self::$document, 'getObjectHelper'))); + $this->assertNotNull($this->invokePrivateMethodFromObject(self::$document, 'getInvoiceObject')); + $this->assertEquals('horstoeko\zugferd\entities\en16931\rsm\CrossIndustryInvoice', get_class($this->invokePrivateMethodFromObject(self::$document, 'getInvoiceObject'))); + $this->assertNotNull($this->invokePrivateMethodFromObject(self::$document, 'getSerializer')); + $this->assertEquals('JMS\Serializer\Serializer', get_class($this->invokePrivateMethodFromObject(self::$document, 'getSerializer'))); + $this->assertNotNull($this->invokePrivateMethodFromObject(self::$document, 'getObjectHelper')); + $this->assertEquals('horstoeko\zugferd\ZugferdObjectHelper', get_class($this->invokePrivateMethodFromObject(self::$document, 'getObjectHelper'))); $this->assertEquals('en16931', self::$document->getProfileDefinitionParameter('name')); $this->assertEquals('XRECHNUNG', self::$document->getProfileDefinitionParameter('altname')); $this->assertEquals('urn:cen.eu:en16931:2017#compliant#urn:xoev-de:kosit:standard:xrechnung_1.2', self::$document->getProfileDefinitionParameter('contextparameter')); diff --git a/tests/testcases/issues/Issue18Test.php b/tests/testcases/issues/Issue18Test.php index 2da5fb40..09e8b9db 100644 --- a/tests/testcases/issues/Issue18Test.php +++ b/tests/testcases/issues/Issue18Test.php @@ -22,8 +22,8 @@ public static function setUpBeforeClass(): void */ public function testBusinessProcessSpecifiedDocumentContextParameter(): void { - $invoiceObject = $this->invokePivateMethodFromObject(self::$document, 'getInvoiceObject'); - $this->assertEquals('horstoeko\zugferd\entities\en16931\rsm\CrossIndustryInvoice', get_class($this->invokePivateMethodFromObject(self::$document, 'getInvoiceObject'))); + $invoiceObject = $this->invokePrivateMethodFromObject(self::$document, 'getInvoiceObject'); + $this->assertEquals('horstoeko\zugferd\entities\en16931\rsm\CrossIndustryInvoice', get_class($this->invokePrivateMethodFromObject(self::$document, 'getInvoiceObject'))); $this->assertEquals('urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0', $invoiceObject->getExchangedDocumentContext()->getGuidelineSpecifiedDocumentContextParameter()->getId()); $this->assertEquals('urn:fdc:peppol.eu:2017:poacc:billing:01:1.0', $invoiceObject->getExchangedDocumentContext()->getBusinessProcessSpecifiedDocumentContextParameter()->getId()); }