You are here

public function SectionStorageManagerTest::testLoadFromStorageId in Drupal 8

@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);
}