You are here

public function StaticMenuLinkOverridesTest::providerTestDeleteOverrides in Drupal 8

Provides test data for testDeleteOverrides.

File

core/tests/Drupal/Tests/Core/Menu/StaticMenuLinkOverridesTest.php, line 204

Class

StaticMenuLinkOverridesTest
@coversDefaultClass \Drupal\Core\Menu\StaticMenuLinkOverrides @group Menu

Namespace

Drupal\Tests\Core\Menu

Code

public function providerTestDeleteOverrides() {
  $data = [];

  // Delete a non existing ID.
  $data[] = [
    'test0',
    [],
    [],
  ];

  // Delete an existing ID.
  $data[] = [
    'test1',
    [
      'test1' => [
        'parent' => 'test0',
      ],
    ],
    [],
  ];

  // Delete an existing ID with a special ID.
  $data[] = [
    'test1.la__ma',
    [
      'test1__la___ma' => [
        'parent' => 'test0',
      ],
    ],
    [],
  ];

  // Delete multiple IDs.
  $data[] = [
    [
      'test1.la__ma',
      'test1',
    ],
    [
      'test1' => [
        'parent' => 'test0',
      ],
      'test1__la___ma' => [
        'parent' => 'test0',
      ],
    ],
    [],
  ];
  return $data;
}