diff --git a/tests/php/Forms/GridField/GridFieldFilterHeaderTest.php b/tests/php/Forms/GridField/GridFieldFilterHeaderTest.php index 18c2a8120c7..db70ddddba9 100644 --- a/tests/php/Forms/GridField/GridFieldFilterHeaderTest.php +++ b/tests/php/Forms/GridField/GridFieldFilterHeaderTest.php @@ -168,7 +168,9 @@ public function testGetSearchForm() public function testCustomSearchField() { $searchSchema = json_decode($this->component->getSearchFieldSchema($this->gridField)); - $this->assertEquals('Name', $searchSchema->name); + $modelClass = $this->gridField->getModelClass(); + $obj = new $modelClass(); + $this->assertEquals($obj->getGeneralSearchFieldName(), $searchSchema->name); Config::modify()->set(Team::class, 'general_search_field', 'CustomSearch'); $searchSchema = json_decode($this->component->getSearchFieldSchema($this->gridField));