public function EntityReferenceSelectionUnitTest::testMalformedHandlerSettingsValue in Drupal 8
Tests the selection handler with malformed 'handler_settings' value.
@covers ::setConfiguration @covers ::resolveBackwardCompatibilityConfiguration
File
- core/
tests/ Drupal/ Tests/ Core/ EntityReferenceSelection/ EntityReferenceSelectionUnitTest.php, line 40
Class
- EntityReferenceSelectionUnitTest
- Provides unit testing for selection handlers.
Namespace
Drupal\Tests\Core\EntityReferenceSelectionCode
public function testMalformedHandlerSettingsValue() {
$this
->expectException(\InvalidArgumentException::class);
$this
->expectExceptionMessage("The setting 'handler_settings' is reserved and cannot be used.");
new TestSelection([
'handler_settings' => FALSE,
], 'test_selector', [
'class' => 'TestSelectionWithInvalidDefaultConfiguration',
]);
}