You are here

public function DefaultsSectionStorageTest::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/DefaultsSectionStorageTest.php, line 117

Class

DefaultsSectionStorageTest
@coversDefaultClass \Drupal\layout_builder\Plugin\SectionStorage\DefaultsSectionStorage

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