You are here

public function OverridesSectionStorageTest::testExtractIdFromRoute in Drupal 8

@covers ::extractIdFromRoute

@dataProvider providerTestExtractIdFromRoute

@expectedDeprecation \Drupal\layout_builder\SectionStorageInterface::extractIdFromRoute() is deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0. \Drupal\layout_builder\SectionStorageInterface::deriveContextsFromRoute() should be used instead. See https://www.drupal.org/node/3016262.

@group legacy

File

core/modules/layout_builder/tests/src/Unit/OverridesSectionStorageTest.php, line 84

Class

OverridesSectionStorageTest
@coversDefaultClass \Drupal\layout_builder\Plugin\SectionStorage\OverridesSectionStorage

Namespace

Drupal\Tests\layout_builder\Unit

Code

public function testExtractIdFromRoute($expected, $value, array $defaults) {
  $result = $this->plugin
    ->extractIdFromRoute($value, [], 'the_parameter_name', $defaults);
  $this
    ->assertSame($expected, $result);
}