EInvoiceAssertions
in package
uses
InteractsWithQuittio
FinalYes
The assertions of {@see InteractsWithQuittio} outside a test case class, e.g. in Pest helper functions: (new EInvoiceAssertions)->assertValidEInvoice($pdf, 'xrechnung').
Table of Contents
Methods
- __construct() : mixed
- assertValidEInvoice() : void
- Reads the PDF or XML and validates it with all configured levels.
- assertXmlMatchesSnapshot() : void
- Compares XML with a stored snapshot (canonicalised); the first run writes it.
- quittioSnapshotDirectory() : string
- quittioSnapshotName() : string
- tearDownInteractsWithQuittio() : void
- Called by Laravel's test case after each test: forgets the process-wide state of Quittio (e.g. base rates registered by a test), see Quittio\Core\Quittio::resetState().
Methods
__construct()
public
__construct([string $snapshotDirectory = '' ]) : mixed
Parameters
- $snapshotDirectory : string = ''
assertValidEInvoice()
Reads the PDF or XML and validates it with all configured levels.
public
assertValidEInvoice(string $pdfOrXml[, string|null $profile = null ]) : void
Parameters
- $pdfOrXml : string
- $profile : string|null = null
assertXmlMatchesSnapshot()
Compares XML with a stored snapshot (canonicalised); the first run writes it.
public
assertXmlMatchesSnapshot(string $xml[, string|null $name = null ]) : void
Parameters
- $xml : string
- $name : string|null = null
quittioSnapshotDirectory()
protected
quittioSnapshotDirectory() : string
Return values
stringquittioSnapshotName()
protected
quittioSnapshotName() : string
Return values
stringtearDownInteractsWithQuittio()
Called by Laravel's test case after each test: forgets the process-wide state of Quittio (e.g. base rates registered by a test), see Quittio\Core\Quittio::resetState().
protected
tearDownInteractsWithQuittio() : void