protected function ResultTest::setUp in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views/tests/src/Unit/Plugin/area/ResultTest.php \Drupal\Tests\views\Unit\Plugin\area\ResultTest::setUp()
Overrides UnitTestCase::setUp
File
- core/
modules/ views/ tests/ src/ Unit/ Plugin/ area/ ResultTest.php, line 34 - Contains \Drupal\Tests\views\Unit\Plugin\area\ResultTest.
Class
- ResultTest
- @coversDefaultClass \Drupal\views\Plugin\views\area\Result @group views
Namespace
Drupal\Tests\views\Unit\Plugin\areaCode
protected function setUp() {
parent::setUp();
$storage = $this
->getMockBuilder('Drupal\\views\\Entity\\View')
->disableOriginalConstructor()
->setMethods(array(
'label',
))
->getMock();
$storage
->expects($this
->any())
->method('label')
->will($this
->returnValue('ResultTest'));
$user = $this
->getMock('Drupal\\Core\\Session\\AccountInterface');
$views_data = $this
->getMockBuilder('Drupal\\views\\ViewsData')
->disableOriginalConstructor()
->getMock();
$route_provider = $this
->getMock('Drupal\\Core\\Routing\\RouteProviderInterface');
$this->view = new ViewExecutable($storage, $user, $views_data, $route_provider);
$this->resultHandler = new Result(array(), 'result', array());
$this->resultHandler->view = $this->view;
}