Commit cc9d0ca5 authored by dawehner's avatar dawehner Committed by tim.plunkett

Add tests to check whether the right display handlers are used

parent 6b7288fe
......@@ -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();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment