You are here

public function ViewExecutableTest::testGetUrlWithoutRouterDisplay in Drupal 8

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

@covers ::getUrl

File

core/modules/views/tests/src/Unit/ViewExecutableTest.php, line 187

Class

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

Namespace

Drupal\Tests\views\Unit

Code

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