Skip to content

Commit

Permalink
MNT Fix broken unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Aug 3, 2022
1 parent 6cdefce commit a57eeb6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/php/Forms/GridField/GridFieldFilterHeaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit a57eeb6

Please sign in to comment.