public function EntityRevisionParamConverterTest::testConvertWithInvalidDynamicEntityType in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Core/ParamConverter/EntityRevisionParamConverterTest.php \Drupal\Tests\Core\ParamConverter\EntityRevisionParamConverterTest::testConvertWithInvalidDynamicEntityType()
- 10 core/tests/Drupal/Tests/Core/ParamConverter/EntityRevisionParamConverterTest.php \Drupal\Tests\Core\ParamConverter\EntityRevisionParamConverterTest::testConvertWithInvalidDynamicEntityType()
Tests the convert() method with an invalid dynamic entity type ID.
@covers ::convert
File
- core/
tests/ Drupal/ Tests/ Core/ ParamConverter/ EntityRevisionParamConverterTest.php, line 132
Class
- EntityRevisionParamConverterTest
- @coversDefaultClass \Drupal\Core\ParamConverter\EntityRevisionParamConverter @group entity
Namespace
Drupal\Tests\Core\ParamConverterCode
public function testConvertWithInvalidDynamicEntityType() {
$this
->expectException(ParamNotConvertedException::class);
$this
->expectExceptionMessage('The "foo" parameter was not converted because the "invalid_entity_type_id" parameter is missing.');
$this->converter
->convert('valid_id', [
'type' => 'entity_revision:{invalid_entity_type_id}',
], 'foo', [
'foo' => 'valid_id',
]);
}