function EntityReferenceSelectionUnitTest::testDeprecationErrorTriggering

Tests deprecation error triggering.

@covers ::setConfiguration @covers ::resolveBackwardCompatibilityConfiguration @expectedDeprecation Providing settings under 'handler_settings' is deprecated in drupal:8.4.0 support for 'handler_settings' is removed from drupal:9.0.0. Move the settings in the root of the configuration array. See https://www.drupal.org/node/2870971

File

core/tests/Drupal/Tests/Core/EntityReferenceSelection/EntityReferenceSelectionUnitTest.php, line 194

Class

EntityReferenceSelectionUnitTest
Provides unit testing for selection handlers.

Namespace

Drupal\Tests\Core\EntityReferenceSelection

Code

public function testDeprecationErrorTriggering() {
    // Configuration with BC level.
    $config = [
        'handler_settings' => [
            'setting1' => TRUE,
        ],
    ];
    new TestSelection($config, 'test_selector', []);
    // Ensure at least one assertion.
    $this->assertTrue(TRUE);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.