function SectionStorageManagerTest::testLoadFromStorageId

@covers ::loadFromStorageId

@expectedDeprecation \Drupal\layout_builder\SectionStorage\SectionStorageManagerInterface::loadFromStorageId() is deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0. \Drupal\layout_builder\SectionStorage\SectionStorageManagerInterface::load() should be used instead. See https://www.drupal.org/node/3012353.

@group legacy

File

core/modules/layout_builder/tests/src/Unit/SectionStorageManagerTest.php, line 121

Class

SectionStorageManagerTest
@coversDefaultClass <a href="/api/drupal/core%21modules%21layout_builder%21src%21SectionStorage%21SectionStorageManager.php/class/SectionStorageManager/8.9.x" title="Provides the Section Storage type plugin manager." class="local">\Drupal\layout_builder\SectionStorage\SectionStorageManager</a>

Namespace

Drupal\Tests\layout_builder\Unit

Code

public function testLoadFromStorageId() {
    $this->plugin
        ->deriveContextsFromRoute('the_storage_id', [], '', [])
        ->willReturn([]);
    $result = $this->manager
        ->loadFromStorageId('the_plugin_id', 'the_storage_id');
    $this->assertInstanceOf(SectionStorageInterface::class, $result);
}

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