NoIndexedDocumentsException example

use Shopware\Elasticsearch\Exception\NoIndexedDocumentsException;

/** * @internal * * @covers \Shopware\Elasticsearch\Exception\NoIndexedDocumentsException */
class NoIndexedDocumentsExceptionTest extends TestCase
{
    public function testException(): void
    {
        $exception = new NoIndexedDocumentsException('product');

        static::assertStringContainsString('No indexed documents found for entity product', $exception->getMessage());
        static::assertSame('ELASTICSEARCH_NO_INDEXED_DOCUMENTS', $exception->getErrorCode());
    }
}
Home | Imprint | This part of the site doesn't use cookies.