protected function PathPluginBaseTest::setupViewExecutableAccessPlugin 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::setupViewExecutableAccessPlugin()
Returns some mocked view entity, view executable, and access plugin.
11 calls to PathPluginBaseTest::setupViewExecutableAccessPlugin()
- 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
- PathPluginBaseTest::testCollectRoutes in core/
modules/ views/ tests/ src/ Unit/ Plugin/ display/ PathPluginBaseTest.php - Tests the collectRoutes method.
File
- core/
modules/ views/ tests/ src/ Unit/ Plugin/ display/ PathPluginBaseTest.php, line 429 - 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
->expects($this
->any())
->method('getTitle')
->willReturn('my views title');
$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 array(
$view,
$view_entity,
$access_plugin,
);
}