function PathPluginBaseTest::setupViewExecutableAccessPlugin
Same name in other branches
- 8.9.x core/modules/views/tests/src/Unit/Plugin/display/PathPluginBaseTest.php \Drupal\Tests\views\Unit\Plugin\display\PathPluginBaseTest::setupViewExecutableAccessPlugin()
- 10 core/modules/views/tests/src/Unit/Plugin/display/PathPluginBaseTest.php \Drupal\Tests\views\Unit\Plugin\display\PathPluginBaseTest::setupViewExecutableAccessPlugin()
- 11.x core/modules/views/tests/src/Unit/Plugin/display/PathPluginBaseTest.php \Drupal\Tests\views\Unit\Plugin\display\PathPluginBaseTest::setupViewExecutableAccessPlugin()
Returns some mocked view entity, view executable, and access plugin.
14 calls to PathPluginBaseTest::setupViewExecutableAccessPlugin()
- PathPluginBaseTest::testAlterPostRestRoute in core/
modules/ views/ tests/ src/ Unit/ Plugin/ display/ PathPluginBaseTest.php - Tests the altering of a REST route.
- PathPluginBaseTest::testAlterRoute in core/
modules/ views/ tests/ src/ Unit/ Plugin/ display/ PathPluginBaseTest.php - Tests the alter route method.
- PathPluginBaseTest::testAlterRoutesWithOptionalParameters in core/
modules/ views/ tests/ src/ Unit/ Plugin/ display/ PathPluginBaseTest.php - Tests altering routes with optional parameters in the overridden route.
- PathPluginBaseTest::testAlterRoutesWithParameters in core/
modules/ views/ tests/ src/ Unit/ Plugin/ display/ PathPluginBaseTest.php - Tests altering routes with parameters in the overridden route.
- PathPluginBaseTest::testAlterRoutesWithParametersAndUpcasting in core/
modules/ views/ tests/ src/ Unit/ Plugin/ display/ PathPluginBaseTest.php - Tests altering routes with parameters and upcasting information.
File
-
core/
modules/ views/ tests/ src/ Unit/ Plugin/ display/ PathPluginBaseTest.php, line 543
Class
- PathPluginBaseTest
- @coversDefaultClass \Drupal\views\Plugin\views\display\PathPluginBase @group views
Namespace
Drupal\Tests\views\Unit\Plugin\displayCode
protected function setupViewExecutableAccessPlugin() {
$view_entity = $this->getMockBuilder('Drupal\\views\\Entity\\View')
->disableOriginalConstructor()
->getMock();
$view_entity->expects($this->any())
->method('id')
->willReturn('test_id');
$view = $this->getMockBuilder('Drupal\\views\\ViewExecutable')
->disableOriginalConstructor()
->getMock();
$view->storage = $view_entity;
$access_plugin = $this->getMockBuilder('Drupal\\views\\Plugin\\views\\access\\AccessPluginBase')
->disableOriginalConstructor()
->getMockForAbstractClass();
$this->accessPluginManager
->expects($this->any())
->method('createInstance')
->willReturn($access_plugin);
return [
$view,
$view_entity,
$access_plugin,
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.