function ViewExecutableTest::testGetUrlWithPathNoPlaceholders
Tests get url with path no placeholders.
@legacy-covers ::getUrl
File
- 
              core/
modules/ views/ tests/ src/ Unit/ ViewExecutableTest.php, line 197  
Class
Namespace
Drupal\Tests\views\UnitCode
public function testGetUrlWithPathNoPlaceholders() : void {
  $this->displayHandler
    ->expects($this->any())
    ->method('getRoutedDisplay')
    ->willReturn($this->displayHandler);
  $this->displayHandlers
    ->expects($this->any())
    ->method('get')
    ->willReturn($this->displayHandler);
  $this->displayHandler
    ->expects($this->any())
    ->method('getUrlInfo')
    ->willReturn(Url::fromRoute('views.test.page_1'));
  $this->displayHandler
    ->expects($this->any())
    ->method('getPath')
    ->willReturn('test-path');
  $this->assertEquals(Url::fromRoute('views.test.page_1'), $this->executable
    ->getUrl());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.