$exception_message="No link template '$rel' found for the '{$this->getEntityTypeId()}' entity type";
// Use the canonical link template by default, or edit-form if there is not
// a canonical one.
if($rel===NULL){
...
...
@@ -174,16 +181,10 @@ public function toUrl($rel = NULL, array $options = []) {
$rel='edit-form';
}
else{
thrownewUndefinedLinkTemplateException("Cannot generate default URL because no link template 'canonical' or 'edit-form' was found for the '{$this->getEntityTypeId()}' entity type");
$exception_message="Cannot generate default URL because no link template 'canonical' or 'edit-form' was found for the '{$this->getEntityTypeId()}' entity type";
}
}
// Links pointing to the current revision point to the actual entity. So
// instead of using the 'revision' link, use the 'canonical' link.
$this->expectExceptionMessage("Cannot generate default URL because no link template 'canonical' or 'edit-form' was found for the '".$this->entityTypeId."' entity type");
...
...
@@ -409,6 +410,9 @@ public function testToUrlUriCallback(array $bundle_info, $uri_callback) {