/**
* Tests the display test plugin.
*
* @see \Drupal\views_test_data\Plugin\views\display\DisplayTest
*/
public function testDisplayPlugin() { /** @var \Drupal\Core\Render\RendererInterface $renderer */
$renderer =
$this->container->
get('renderer'
);
$view = Views::
getView('test_view'
);
// Add a new 'display_test' display and test it's there.
$view->storage->
addDisplay('display_test'
);
$displays =
$view->storage->
get('display'
);
$this->
assertTrue(isset($displays['display_test_1'
]), 'Added display has been assigned to "display_test_1"'
);
// Check the display options are like expected.
$options =
[ 'display_options' =>
[],
'display_plugin' => 'display_test',
'id' => 'display_test_1',
'display_title' => 'Display test',
'position' => 1,
];