You are here

public function SectionStorageManagerTest::testLoad in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/layout_builder/tests/src/Unit/SectionStorageManagerTest.php \Drupal\Tests\layout_builder\Unit\SectionStorageManagerTest::testLoad()

@covers ::load

File

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

Class

SectionStorageManagerTest
@coversDefaultClass \Drupal\layout_builder\SectionStorage\SectionStorageManager

Namespace

Drupal\Tests\layout_builder\Unit

Code

public function testLoad() {
  $contexts = [
    'the_context' => $this
      ->prophesize(ContextInterface::class)
      ->reveal(),
  ];
  $this->contextHandler
    ->applyContextMapping($this->plugin, $contexts)
    ->shouldBeCalled();
  $result = $this->manager
    ->load('the_plugin_id', $contexts);
  $this
    ->assertSame($this->plugin
    ->reveal(), $result);
}