mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Fix unit test
This commit is contained in:
parent
a43414dedb
commit
5226d961e8
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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',
|
||||
|
@ -29,5 +29,4 @@ class GridStateTest extends SapphireTest
|
||||
'GridState with changes returns has a JSON object string for Value.'
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user