function EntityReferenceSelectionUnitTest::testInvalidDefaultConfiguration
Tests invalid default configuration.
@covers ::defaultConfiguration @covers ::resolveBackwardCompatibilityConfiguration
File
-
core/
tests/ Drupal/ Tests/ Core/ EntityReferenceSelection/ EntityReferenceSelectionUnitTest.php, line 24
Class
- EntityReferenceSelectionUnitTest
- Provides unit testing for selection handlers.
Namespace
Drupal\Tests\Core\EntityReferenceSelectionCode
public function testInvalidDefaultConfiguration() {
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage("TestSelectionWithInvalidDefaultConfiguration::defaultConfiguration() should not contain a 'handler_settings' key. All settings should be placed in the root level.");
new TestSelectionWithInvalidDefaultConfiguration([], 'test_selector', [
'class' => 'TestSelectionWithInvalidDefaultConfiguration',
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.