protected function ViewsTest::setUp in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views/tests/src/Unit/ViewsTest.php \Drupal\Tests\views\Unit\ViewsTest::setUp()
Overrides UnitTestCase::setUp
File
- core/
modules/ views/ tests/ src/ Unit/ ViewsTest.php, line 35 - Contains \Drupal\Tests\views\Unit\ViewsTest.
Class
- ViewsTest
- @coversDefaultClass \Drupal\views\Views @group views
Namespace
Drupal\Tests\views\UnitCode
protected function setUp() {
parent::setUp();
$this->container = new ContainerBuilder();
$user = $this
->getMock('Drupal\\Core\\Session\\AccountInterface');
$request_stack = new RequestStack();
$request_stack
->push(new Request());
$views_data = $this
->getMockBuilder('Drupal\\views\\ViewsData')
->disableOriginalConstructor()
->getMock();
$route_provider = $this
->getMock('Drupal\\Core\\Routing\\RouteProviderInterface');
$this->container
->set('views.executable', new ViewExecutableFactory($user, $request_stack, $views_data, $route_provider));
\Drupal::setContainer($this->container);
}