diff --git a/lib/Drupal/views/Tests/ViewStorageTest.php b/lib/Drupal/views/Tests/ViewStorageTest.php index 1f93e60554d378d22b7c19018f177458ac4dbb50..fa07fbe1a86306b65752f485737b35f07fa53ff0 100644 --- a/lib/Drupal/views/Tests/ViewStorageTest.php +++ b/lib/Drupal/views/Tests/ViewStorageTest.php @@ -158,6 +158,20 @@ function testConfigurableCRUD() { $config = config('views.view.archive_copy'); $this->assertTrue($config->isNew(), 'Deleted config is now new.'); + + // Check whether load, save and load produce the same kind of view. + $values = config('views.view.archive')->get(); + $created = $controller->create($values); + + $created->save(); + $loaded_entities = $controller->load(array($created->id())); + $created_loaded = reset($loaded_entities); + $values_loaded = config('views.view.archive')->get(); + + $this->assertTrue(isset($created_loaded->display['default']->display_options), 'Make sure that the display options exists.'); + $this->assertEqual($created_loaded->display['default']->display_plugin, 'default', 'Make sure the right display plugin is set.'); + + $this->assertEqual($values, $values_loaded, 'The loaded config is the same as the original loaded one.'); } }