You are here

public function ViewExecutableTest::testGetUrlWithoutRouterDisplay in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/views/tests/src/Unit/ViewExecutableTest.php \Drupal\Tests\views\Unit\ViewExecutableTest::testGetUrlWithoutRouterDisplay()

@expectedException \InvalidArgumentException

@covers ::getUrl

File

core/modules/views/tests/src/Unit/ViewExecutableTest.php, line 148
Contains \Drupal\Tests\views\Unit\ViewExecutableTest.

Class

ViewExecutableTest
@coversDefaultClass \Drupal\views\ViewExecutable @group views

Namespace

Drupal\Tests\views\Unit

Code

public function testGetUrlWithoutRouterDisplay() {
  $this->displayHandler = $this
    ->getMock('Drupal\\views\\Plugin\\views\\display\\DisplayPluginInterface');
  $this->displayHandlers
    ->expects($this
    ->any())
    ->method('get')
    ->willReturn($this->displayHandler);
  $this->executable->display_handler = $this->displayHandler;
  $this->executable
    ->getUrl();
}