You are here

public function StaticMenuLinkOverridesTest::providerTestDeleteOverrides in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Core/Menu/StaticMenuLinkOverridesTest.php \Drupal\Tests\Core\Menu\StaticMenuLinkOverridesTest::providerTestDeleteOverrides()

Provides test data for testDeleteOverrides.

File

core/tests/Drupal/Tests/Core/Menu/StaticMenuLinkOverridesTest.php, line 209
Contains \Drupal\Tests\Core\Menu\StaticMenuLinkOverridesTest.

Class

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

Namespace

Drupal\Tests\Core\Menu

Code

public function providerTestDeleteOverrides() {
  $data = array();

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

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

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

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