Skip to content

Commit

Permalink
fixup! IBX-6649: Added support for spell checking
Browse files Browse the repository at this point in the history
  • Loading branch information
adamwojs committed Dec 5, 2023
1 parent 177afbd commit 49b02d9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/integration/Core/Repository/SearchServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4668,14 +4668,14 @@ public function testSpellcheckWithIncorrectQuery(): void
}

$query = new Query();
// Search phrase with typo: "Ibexa Platfomr" instead of "Ibexa Platform":
$query->spellcheck = new Query\Spellcheck('Ibexa Platfomr');
// Search phrase with typo: "Contatc Us" instead of "Contact Us":
$query->spellcheck = new Query\Spellcheck('Contatc Us');

$results = $searchService->findContent($query);

self::assertNotNull($results->spellcheck);
self::assertTrue($results->spellcheck->isIncorrect());
self::assertEquals('Ibexa Platform', $results->spellcheck->getQuery());
self::assertEquals('Contact Us', $results->spellcheck->getQuery());
}

public function testSpellcheckWithCorrectQuery(): void
Expand All @@ -4688,13 +4688,13 @@ public function testSpellcheckWithCorrectQuery(): void

$query = new Query();
// Search phrase without typo
$query->spellcheck = new Query\Spellcheck('Ibexa Platform');
$query->spellcheck = new Query\Spellcheck('Contact Us');

$results = $searchService->findContent($query);

self::assertNotNull($results->spellcheck);
self::assertFalse($results->spellcheck->isIncorrect());
self::assertEquals('Ibexa Platform', $results->spellcheck->getQuery());
self::assertEquals('Contact Us', $results->spellcheck->getQuery());
}

/**
Expand Down

0 comments on commit 49b02d9

Please sign in to comment.