function EntityReferenceSelectionUnitTest::testMalformedHandlerSettingsValue
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',
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.