public function PathPluginBaseTest::setupContainer 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::setupContainer()
Setup access plugin manager and config factory in the Drupal class.
1 call to PathPluginBaseTest::setupContainer()
- PathPluginBaseTest::setUp in core/
modules/ views/ tests/ src/ Unit/ Plugin/ display/ PathPluginBaseTest.php
File
- core/
modules/ views/ tests/ src/ Unit/ Plugin/ display/ PathPluginBaseTest.php, line 67 - 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 setupContainer() {
$this->accessPluginManager = $this
->getMockBuilder('\\Drupal\\views\\Plugin\\ViewsPluginManager')
->disableOriginalConstructor()
->getMock();
$container = new ContainerBuilder();
$container
->set('plugin.manager.views.access', $this->accessPluginManager);
$config = array(
'views.settings' => array(
'skip_cache' => TRUE,
'display_extenders' => array(),
),
);
$container
->set('config.factory', $this
->getConfigFactoryStub($config));
\Drupal::setContainer($container);
}