From b30d03cf4abfd2ac9521a5e951987b40c1e4845f Mon Sep 17 00:00:00 2001 From: damiankloip <damian@damoweb.co.uk> Date: Sun, 26 Aug 2012 18:52:48 +0200 Subject: [PATCH] created tests --- lib/Drupal/views/Tests/ViewsStorageTest.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/Drupal/views/Tests/ViewsStorageTest.php b/lib/Drupal/views/Tests/ViewsStorageTest.php index 8907b2f02595..348e3625f695 100644 --- a/lib/Drupal/views/Tests/ViewsStorageTest.php +++ b/lib/Drupal/views/Tests/ViewsStorageTest.php @@ -135,21 +135,22 @@ function testConfigurableCRUD() { } // Save the newly created view, but modify the name. - // $created->set('name', 'archive_copy'); - // $created->save(); + $created->set('name', 'archive_copy'); + $created->set('tag', 'changed'); + $created->save(); - // // Load the newly saved config. - // $config = config('views.view.archive_copy'); - // $this->assertFalse($config->isNew(), 'Loaded configuration is not new.'); + // Load the newly saved config. + $config = config('views.view.archive_copy'); + $this->assertFalse($config->isNew(), 'New config has been loaded.'); + + $this->assertEqual($created->tag, $config->get('tag'), 'A changed value has been saved.'); // Change a value and save. $view->tag = 'changed'; $view->save(); - debug($view->tag); // Check value have been written to config. $config = config('views.view.archive')->get(); - debug($config['tag']); $this->assertEqual($view->tag, $config['tag'], 'View property saved to config.'); } -- GitLab