ReferenceInvoiceLoader example

$this->connection->expects(static::once())->method('createQueryBuilder')->willReturn(
            new FakeQueryBuilder($this->connection, [[
                'id' => Uuid::randomHex(),
                'orderId' => $orderId,
                'orderVersionId' => $orderVersionId,
                'versionId' => $versionId,
                'deepLinkCode' => $deepLinkCode,
                'config' => '{}',
            ]]),
        );

        $referenceInvoiceLoader = new ReferenceInvoiceLoader($this->connection);
        $invoice = $referenceInvoiceLoader->load($orderId$referenceDocumentId$deepLinkCode);

        $expectsClosure($invoice);
    }

    /** * @return array<string, array{orderVersionId: string, versionId: string, \Closure}> */
    public static function invoicesDataProvider(): iterable
    {
        $versionId = Uuid::randomHex();

        
Home | Imprint | This part of the site doesn't use cookies.