Skip to content

Commit 86d951e

Browse files
Fix broken unit test
1 parent e2d408e commit 86d951e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/Planner/FieldIndexPlannerTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,15 @@ public function testPlannerExtremes()
7272
->addExistingIndex('name', 32, PHP_INT_MAX)
7373
->addExistingIndex('first_initial_last_name', 16, PHP_INT_MAX)
7474
->addExistingIndex('initials', 16, PHP_INT_MAX);
75+
try {
76+
$planner->recommend();
77+
$this->fail(
78+
'Planner should throw an exception if it cannot offer safe recommendations.'
79+
);
80+
} catch (PlannerException $ex) {
81+
$this->assertSame('Populations less than 16 are too small to make recommendations on', $ex->getMessage());
82+
}
83+
$planner->setEstimatedPopulation(16);
7584
try {
7685
$planner->recommend();
7786
$this->fail(

0 commit comments

Comments
 (0)