/**
* Tests that validation fails if config dependencies are invalid.
*/
public function testInvalidDependencies(): void
{ // Remove the config dependencies from the editor entity.
$dependencies =
$this->entity->
getDependencies();
$dependencies['config'
] =
[];
$this->entity->
set('dependencies',
$dependencies);
$this->
assertValidationErrors(['' => 'This text editor requires a text format.'
]);
// Things look sort-of like `filter.format.*` should fail validation
// because they don't exist.
$dependencies['config'
] =
[ 'filter.format',
'filter.format.',
];
$this->entity->
set('dependencies',
$dependencies);
$this->
assertValidationErrors([ '' => 'This text editor requires a text format.',
'dependencies.config.0' => "The 'filter.format' config does not exist.",