From cc9d0ca5c16a467cb8920ae37918089eadc4e9cd Mon Sep 17 00:00:00 2001 From: Daniel Wehner <daniel.wehner@erdfisch.de> Date: Mon, 27 Aug 2012 13:20:15 +0200 Subject: [PATCH] Add tests to check whether the right display handlers are used --- lib/Drupal/views/Tests/ViewStorageTest.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/Drupal/views/Tests/ViewStorageTest.php b/lib/Drupal/views/Tests/ViewStorageTest.php index 33bada2ac15c..d8358a97d7d7 100644 --- a/lib/Drupal/views/Tests/ViewStorageTest.php +++ b/lib/Drupal/views/Tests/ViewStorageTest.php @@ -10,6 +10,7 @@ use Drupal\views\ViewStorageController; use Drupal\views\View; use Drupal\views\ViewDisplay; +use Drupal\views\Plugin\views\display\Page; /** * Tests that functionality of the the ViewStorageController. @@ -180,6 +181,12 @@ function testConfigurableCRUD() { $new_display = $created->display['test']; $this->assertTrue($new_display instanceof ViewDisplay, 'New page display "test" created.'); + // Take sure the right display_plugin is created/instantiated. + $this->assertEqual($new_display->display_plugin, 'page', 'New page display "test" uses the right display plugin.'); + $created->init_display(); + $this->assertTrue($new_display->handler instanceof Page, 'New page display "test" uses the right display plugin.'); + + $created->set('name', 'archive_new_display'); $created->save(); $values = config('views.view.archive_new_display')->get(); -- GitLab