MNT Fix broken unit test

This commit is contained in:
Guy Sartorelli 2022-08-03 15:47:14 +12:00
parent 6cdefcedf0
commit a57eeb614b
1 changed files with 3 additions and 1 deletions

View File

@ -168,7 +168,9 @@ class GridFieldFilterHeaderTest extends SapphireTest
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));