Skip to content

Commit

Permalink
Merge pull request #157 from pagemachine/functional-test-document-ass…
Browse files Browse the repository at this point in the history
…ertions-uid

Add UID to functional test document assertion messages
  • Loading branch information
mbrodala authored Jan 9, 2025
2 parents d4249b0 + ec2fd78 commit 6189f4a
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', $uid));
}

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 6189f4a

Please sign in to comment.