public function EntityTypeTest::testSetLinkTemplateWithInvalidPath in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php \Drupal\Tests\Core\Entity\EntityTypeTest::testSetLinkTemplateWithInvalidPath()
@covers ::setLinkTemplate
File
- core/
tests/ Drupal/ Tests/ Core/ Entity/ EntityTypeTest.php, line 455
Class
- EntityTypeTest
- @coversDefaultClass \Drupal\Core\Entity\EntityType @group Entity
Namespace
Drupal\Tests\Core\EntityCode
public function testSetLinkTemplateWithInvalidPath() {
$entity_type = $this
->setUpEntityType([
'id' => $this
->randomMachineName(),
]);
$this
->expectException(\InvalidArgumentException::class);
$entity_type
->setLinkTemplate('test', 'invalid-path');
}