function MenuTest::providerSource

Same name in other branches
  1. 9 core/modules/system/tests/src/Kernel/Plugin/migrate/source/MenuTest.php \Drupal\Tests\system\Kernel\Plugin\migrate\source\MenuTest::providerSource()
  2. 10 core/modules/system/tests/src/Kernel/Plugin/migrate/source/MenuTest.php \Drupal\Tests\system\Kernel\Plugin\migrate\source\MenuTest::providerSource()
  3. 11.x core/modules/system/tests/src/Kernel/Plugin/migrate/source/MenuTest.php \Drupal\Tests\system\Kernel\Plugin\migrate\source\MenuTest::providerSource()

Overrides MigrateSourceTestBase::providerSource

File

core/modules/system/tests/src/Kernel/Plugin/migrate/source/MenuTest.php, line 24

Class

MenuTest
Tests menu source plugin.

Namespace

Drupal\Tests\system\Kernel\Plugin\migrate\source

Code

public function providerSource() {
    $tests = [];
    // The source data.
    $tests[0]['source_data']['menu_custom'] = [
        [
            'menu_name' => 'menu-name-1',
            'title' => 'menu custom value 1',
            'description' => 'menu custom description value 1',
        ],
        [
            'menu_name' => 'menu-name-2',
            'title' => 'menu custom value 2',
            'description' => 'menu custom description value 2',
        ],
    ];
    // The expected results are identical to the source data.
    $tests[0]['expected_data'] = $tests[0]['source_data']['menu_custom'];
    return $tests;
}

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