function StaticMenuLinkOverridesTest::providerTestDeleteOverrides

Same name and namespace in other branches
  1. 8.9.x core/tests/Drupal/Tests/Core/Menu/StaticMenuLinkOverridesTest.php \Drupal\Tests\Core\Menu\StaticMenuLinkOverridesTest::providerTestDeleteOverrides()
  2. 10 core/tests/Drupal/Tests/Core/Menu/StaticMenuLinkOverridesTest.php \Drupal\Tests\Core\Menu\StaticMenuLinkOverridesTest::providerTestDeleteOverrides()
  3. 11.x 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 179

Class

StaticMenuLinkOverridesTest
@coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21Menu%21StaticMenuLinkOverrides.php/class/StaticMenuLinkOverrides/9" title="Defines an implementation of the menu link override using a config file." class="local">\Drupal\Core\Menu\StaticMenuLinkOverrides</a> @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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.