public function PathPluginBaseTest::testGetRouteName in Drupal 8
Same name and namespace in other branches
- 9 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 526 - 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 = [];
$display['display_plugin'] = 'page';
$display['id'] = 'page_1';
$display['display_options'] = [
'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);
}