public function ConfigSelectorTest::testGetConfigEntityLinkToUrlException in Configuration selector 8.2
Same name and namespace in other branches
- 8 tests/src/Unit/ConfigSelectorTest.php \Drupal\Tests\config_selector\Unit\ConfigSelectorTest::testGetConfigEntityLinkToUrlException()
@covers ::getConfigEntityLink
File
- tests/
src/ Unit/ ConfigSelectorTest.php, line 49
Class
- ConfigSelectorTest
- Tests the ConfigSelector.
Namespace
Drupal\Tests\config_selector\UnitCode
public function testGetConfigEntityLinkToUrlException() {
$config_entity = $this
->prophesize(ConfigEntityInterface::class);
$config_entity
->hasLinkTemplate('edit-form')
->willReturn(FALSE);
$config_entity
->toUrl()
->willThrow(UndefinedLinkTemplateException::class);
$this
->assertEquals('', ConfigSelector::getConfigEntityLink($config_entity
->reveal()));
}