Fix unit test

This commit is contained in:
Maxime Rainville 2020-08-18 10:29:57 +12:00
parent a43414dedb
commit 5226d961e8
3 changed files with 2 additions and 3 deletions

View File

@ -42,7 +42,7 @@ class GridFieldStateManager implements GridFieldStateManagerInterface
$value = $gridField->getState(false)->Value();
// Using a JSON-encoded empty array as the blank value, to avoid changing Value() semantics in a minor release
if ($value === '[]') {
if ($value === '{}') {
return $url;
}

View File

@ -87,7 +87,7 @@ class GridFieldStateManagerTest extends SapphireTest
$grid->getState()->initDefaults(['testValue' => 'foo']);
$link = '/link-to/something';
$this->assertEquals('[]', $grid->getState(false)->Value());
$this->assertEquals('{}', $grid->getState(false)->Value());
$this->assertEquals(
'/link-to/something',

View File

@ -29,5 +29,4 @@ class GridStateTest extends SapphireTest
'GridState with changes returns has a JSON object string for Value.'
);
}
}