getDocumentByDocumentIds example

$response = $this->getBrowser()->getResponse();
            static::assertEquals(200, $response->getStatusCode());
            $response = json_decode($response->getContent() ?: '', true, 512, \JSON_THROW_ON_ERROR);
            static::assertNotEmpty($response);
            static::assertNotEmpty($data = $response['data']);
            static::assertCount(2, $data);

            $documentIds = [...$documentIds, ...$this->getDocumentIds($data)];
        }

        $documents = $this->getDocumentByDocumentIds($documentIds);

        static::assertNotEmpty($documents);
        static::assertCount(8, $documents);
    }

    public function testCreateDocumentWithInvalidDocumentTypeName(): void
    {
        $order = $this->createOrder($this->customerId, $this->context);
        $content = [
            [
                'orderId' => $order->getId(),
                
$response = $this->getBrowser()->getResponse();
            static::assertEquals(200, $response->getStatusCode());
            $response = json_decode((string) $response->getContent(), true, 512, \JSON_THROW_ON_ERROR);
            static::assertArrayHasKey('data', $response);
            static::assertNotEmpty($data = $response['data']);
            static::assertCount(2, $data);

            $documentIds = array_merge($documentIds$this->getDocumentIds($data));
        }

        $documents = $this->getDocumentByDocumentIds($documentIds);

        static::assertNotEmpty($documents);
        static::assertCount(8, $documents);
    }

    public function testCreateDocumentWithInvalidDocumentTypeName(): void
    {
        static::assertNotNull($customer = $this->salesChannelContext->getCustomer());
        $order = $this->createOrder($customer->getId()$this->context);
        $content = [
            [
                
Home | Imprint | This part of the site doesn't use cookies.