protected function PathPluginBaseTest::setupViewExecutableAccessPlugin in Drupal 9
Same name and namespace in other branches
- 8 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()
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 - 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
protected function setupViewExecutableAccessPlugin() {
$view_entity = $this
->getMockBuilder('Drupal\\views\\Entity\\View')
->disableOriginalConstructor()
->getMock();
$view_entity
->expects($this
->any())
->method('id')
->will($this
->returnValue('test_id'));
$view = $this
->getMockBuilder('Drupal\\views\\ViewExecutable')
->disableOriginalConstructor()
->getMock();
$view->storage = $view_entity;
// Skip views options caching.
$view->editing = TRUE;
$access_plugin = $this
->getMockBuilder('Drupal\\views\\Plugin\\views\\access\\AccessPluginBase')
->disableOriginalConstructor()
->getMockForAbstractClass();
$this->accessPluginManager
->expects($this
->any())
->method('createInstance')
->will($this
->returnValue($access_plugin));
return [
$view,
$view_entity,
$access_plugin,
];
}