function ViewExecutableTest::testGetUrlWithoutRouterDisplay

Tests get url without router display.

@legacy-covers ::getUrl

File

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

Class

ViewExecutableTest
Tests Drupal\views\ViewExecutable.

Namespace

Drupal\Tests\views\Unit

Code

public function testGetUrlWithoutRouterDisplay() : void {
  $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();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.