public function StaticMenuLinkOverridesTest::providerTestLoadOverride in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Core/Menu/StaticMenuLinkOverridesTest.php \Drupal\Tests\Core\Menu\StaticMenuLinkOverridesTest::providerTestLoadOverride()
Provides test data for testLoadOverride.
File
- core/
tests/ Drupal/ Tests/ Core/ Menu/ StaticMenuLinkOverridesTest.php, line 65 - Contains \Drupal\Tests\Core\Menu\StaticMenuLinkOverridesTest.
Class
- StaticMenuLinkOverridesTest
- @coversDefaultClass \Drupal\Core\Menu\StaticMenuLinkOverrides @group Menu
Namespace
Drupal\Tests\Core\MenuCode
public function providerTestLoadOverride() {
$data = array();
// No specified ID.
$data[] = array(
array(
'test1' => array(
'parent' => 'test0',
),
),
NULL,
array(),
);
// Valid ID.
$data[] = array(
array(
'test1' => array(
'parent' => 'test0',
),
),
'test1',
array(
'parent' => 'test0',
),
);
// Non existing ID.
$data[] = array(
array(
'test1' => array(
'parent' => 'test0',
),
),
'test2',
array(),
);
// Ensure that the ID is encoded properly
$data[] = array(
array(
'test1__la___ma' => array(
'parent' => 'test0',
),
),
'test1.la__ma',
array(
'parent' => 'test0',
),
);
return $data;
}