mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MNT Fix broken unit test
This commit is contained in:
parent
6cdefcedf0
commit
a57eeb614b
@ -168,7 +168,9 @@ class GridFieldFilterHeaderTest extends SapphireTest
|
|||||||
public function testCustomSearchField()
|
public function testCustomSearchField()
|
||||||
{
|
{
|
||||||
$searchSchema = json_decode($this->component->getSearchFieldSchema($this->gridField));
|
$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');
|
Config::modify()->set(Team::class, 'general_search_field', 'CustomSearch');
|
||||||
$searchSchema = json_decode($this->component->getSearchFieldSchema($this->gridField));
|
$searchSchema = json_decode($this->component->getSearchFieldSchema($this->gridField));
|
||||||
|
Loading…
Reference in New Issue
Block a user