function DefaultSingleLazyPluginCollectionTest::testConfigurableSetConfigurationToNull

@covers ::setConfiguration @group legacy

File

core/tests/Drupal/Tests/Core/Plugin/DefaultSingleLazyPluginCollectionTest.php, line 100

Class

DefaultSingleLazyPluginCollectionTest
@coversDefaultClass \Drupal\Core\Plugin\DefaultSingleLazyPluginCollection @group Plugin

Namespace

Drupal\Tests\Core\Plugin

Code

public function testConfigurableSetConfigurationToNull() : void {
    $this->setupPluginCollection($this->any());
    $this->expectDeprecation('Calling Drupal\\Core\\Plugin\\DefaultSingleLazyPluginCollection::setConfiguration() with a non-array argument is deprecated in drupal:10.3.0 and will fail in drupal:11.0.0. See https://www.drupal.org/node/3406191');
    $this->defaultPluginCollection
        ->setConfiguration(NULL);
    $this->assertSame([], $this->defaultPluginCollection
        ->getConfiguration());
}

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