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 \Drupal\layout_builder\SectionStorage\SectionStorageManager

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.