0feb9a2b0fe6c2c4784814667f63eae1d855c10a
[yaffs-website] / web / core / modules / system / tests / src / Kernel / Plugin / migrate / source / MenuTest.php
1 <?php
2
3 namespace Drupal\Tests\system\Kernel\Plugin\migrate\source;
4
5 use Drupal\Tests\migrate\Kernel\MigrateSqlSourceTestBase;
6
7 /**
8  * Tests menu source plugin.
9  *
10  * @covers Drupal\system\Plugin\migrate\source\Menu
11  *
12  * @group system
13  */
14 class MenuTest extends MigrateSqlSourceTestBase {
15
16   /**
17    * {@inheritdoc}
18    */
19   public static $modules = ['system', 'migrate_drupal'];
20
21   /**
22    * {@inheritdoc}
23    */
24   public function providerSource() {
25     $tests = [];
26
27     // The source data.
28     $tests[0]['source_data']['menu_custom'] = [
29       [
30         'menu_name' => 'menu-name-1',
31         'title' => 'menu custom value 1',
32         'description' => 'menu custom description value 1',
33       ],
34       [
35         'menu_name' => 'menu-name-2',
36         'title' => 'menu custom value 2',
37         'description' => 'menu custom description value 2',
38       ],
39     ];
40
41     // The expected results are identical to the source data.
42     $tests[0]['expected_data'] = $tests[0]['source_data']['menu_custom'];
43
44     return $tests;
45   }
46
47 }