protected function RouteSubscriberTest::setUp in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views/tests/src/Unit/EventSubscriber/RouteSubscriberTest.php \Drupal\Tests\views\Unit\EventSubscriber\RouteSubscriberTest::setUp()
Overrides UnitTestCase::setUp
File
- core/
modules/ views/ tests/ src/ Unit/ EventSubscriber/ RouteSubscriberTest.php, line 50 - Contains \Drupal\Tests\views\Unit\EventSubscriber\RouteSubscriberTest.
Class
- RouteSubscriberTest
- @coversDefaultClass \Drupal\views\EventSubscriber\RouteSubscriber @group views
Namespace
Drupal\Tests\views\Unit\EventSubscriberCode
protected function setUp() {
$this->entityManager = $this
->getMock('Drupal\\Core\\Entity\\EntityManagerInterface');
$this->viewStorage = $this
->getMockBuilder('Drupal\\Core\\Config\\Entity\\ConfigEntityStorage')
->disableOriginalConstructor()
->getMock();
$this->entityManager
->expects($this
->any())
->method('getStorage')
->with('view')
->will($this
->returnValue($this->viewStorage));
$this->state = $this
->getMock('\\Drupal\\Core\\State\\StateInterface');
$this->routeSubscriber = new TestRouteSubscriber($this->entityManager, $this->state);
}