function OverridesSectionStorageTest::providerTestExtractIdFromRoute
Provides data for ::testExtractIdFromRoute().
File
-
core/
modules/ layout_builder/ tests/ src/ Unit/ OverridesSectionStorageTest.php, line 92
Class
- OverridesSectionStorageTest
- @coversDefaultClass \Drupal\layout_builder\Plugin\SectionStorage\OverridesSectionStorage
Namespace
Drupal\Tests\layout_builder\UnitCode
public function providerTestExtractIdFromRoute() {
$data = [];
$data['with value, with layout'] = [
'my_entity_type.entity_with_layout',
'my_entity_type.entity_with_layout',
[],
];
$data['with value, without layout'] = [
NULL,
'my_entity_type',
[],
];
$data['empty value, populated defaults'] = [
'my_entity_type.entity_with_layout',
'',
[
'entity_type_id' => 'my_entity_type',
'my_entity_type' => 'entity_with_layout',
],
];
$data['empty value, empty defaults'] = [
NULL,
'',
[],
];
return $data;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.