Skip to content

Commit

Permalink
Merge pull request silverstripe#10434 from creative-commoners/pulls/4…
Browse files Browse the repository at this point in the history
…/fix-test

MNT Fix broken unit test
  • Loading branch information
GuySartorelli authored Aug 3, 2022
2 parents 6cdefce + a57eeb6 commit 9b1052f
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 9b1052f

Please sign in to comment.