/**
* @internal
*
* @covers \Shopware\Elasticsearch\Framework\Indexing\ElasticsearchIndexingException
*/
#[Package('core')]
class ElasticsearchIndexingExceptionTest extends TestCase
{ public function testIndexingError(): void
{ $res = ElasticsearchIndexingException::
indexingError([[ 'index' => 'index',
'id' => 'id',
'type' => 'error',
'reason' => 'Foo Error',
]]);
static::
assertEquals(Response::HTTP_INTERNAL_SERVER_ERROR,
$res->
getStatusCode());
static::
assertEquals('ELASTICSEARCH_INDEXING',
$res->
getErrorCode());
static::
assertStringContainsString($res->
getMessage(), 'Following errors occurred while indexing: ' . \PHP_EOL . 'Foo Error'
);
}