Skip to content

Commit

Permalink
[TASK] Add UID to functional test document assertion messages
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrodala authored Jan 9, 2025
1 parent d4249b0 commit 132d698
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Tests/Functional/AbstractElasticsearchTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -283,15 +283,15 @@ protected function assertDocumentInIndex(int $uid, array $documentSubset = [], i
{
$document = $this->searchDocumentByUid($uid, $languageId);

$this->assertNotEmpty($document, 'Document not in index');
$this->assertArraySubset($documentSubset, $document, false, 'Document source mismatch');
$this->assertNotEmpty($document, sprintf('Document %d not in index', $uid));
$this->assertArraySubset($documentSubset, $document, false, sprintf('Document %d source mismatch'));
}

protected function assertDocumentNotInIndex(int $uid, int $languageId = 0): void
{
$document = $this->searchDocumentByUid($uid, $languageId);

$this->assertEmpty($document, 'Document in index');
$this->assertEmpty($document, sprintf('Document %d in index', $uid));
}

protected function getElasticsearchClient(): ElasticsearchClient
Expand Down

0 comments on commit 132d698

Please sign in to comment.