withoutMiddleware( ThrottleRequests::class ); $this->makeTestData(); } public function testEInvoiceGenerates() { $xinvoice = (new CreateXInvoice($this->invoice, false))->handle(); $this->assertNotNull($xinvoice); $this->assertFileExists($xinvoice); } /** * @throws Exception */ public function testValidityofXMLFile() { $xinvoice = (new CreateXInvoice($this->invoice, false))->handle(); $document = ZugferdDocumentReader::readAndGuessFromFile($xinvoice); $document ->getDocumentInformation($documentno); $this->assertEquals($this->invoice->number, $documentno); } /** * @throws Exception */ public function checkEmbededPDFFile() { $pdf = (new CreateEntityPdf($this->invoice->invitations()->first())); (new CreateXInvoice($this->invoice, true, $pdf))->handle(); $document = ZugferdDocumentReader::readAndGuessFromFile($pdf); $document ->getDocumentInformation($documentno); $this->assertEquals($this->invoice->number, $documentno); } }