Skip to content

Commit

Permalink
Fix broken unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
paragonie-security committed Jul 3, 2024
1 parent e2d408e commit 86d951e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/Planner/FieldIndexPlannerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,15 @@ public function testPlannerExtremes()
->addExistingIndex('name', 32, PHP_INT_MAX)
->addExistingIndex('first_initial_last_name', 16, PHP_INT_MAX)
->addExistingIndex('initials', 16, PHP_INT_MAX);
try {
$planner->recommend();
$this->fail(
'Planner should throw an exception if it cannot offer safe recommendations.'
);
} catch (PlannerException $ex) {
$this->assertSame('Populations less than 16 are too small to make recommendations on', $ex->getMessage());
}
$planner->setEstimatedPopulation(16);
try {
$planner->recommend();
$this->fail(
Expand Down

0 comments on commit 86d951e

Please sign in to comment.