public function PathPluginBaseTest::testGetRouteName in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views/tests/src/Unit/Plugin/display/PathPluginBaseTest.php \Drupal\Tests\views\Unit\Plugin\display\PathPluginBaseTest::testGetRouteName()
Tests the getRouteName method.
File
- core/
modules/ views/ tests/ src/ Unit/ Plugin/ display/ PathPluginBaseTest.php, line 411 - Contains \Drupal\Tests\views\Unit\Plugin\display\PathPluginBaseTest.
Class
- PathPluginBaseTest
- @coversDefaultClass \Drupal\views\Plugin\views\display\PathPluginBase @group views
Namespace
Drupal\Tests\views\Unit\Plugin\displayCode
public function testGetRouteName() {
list($view) = $this
->setupViewExecutableAccessPlugin();
$display = array();
$display['display_plugin'] = 'page';
$display['id'] = 'page_1';
$display['display_options'] = array(
'path' => 'test_route',
);
$this->pathPlugin
->initDisplay($view, $display);
$route_name = $this->pathPlugin
->getRouteName();
// Ensure that the expected routename is returned.
$this
->assertEquals('view.test_id.page_1', $route_name);
}