9f8fd3ae66d957895fa21239c20484b3c8c1dc4c
[yaffs-website] / web / core / modules / shortcut / tests / src / Kernel / Plugin / migrate / source / d7 / ShortcutTest.php
1 <?php
2
3 namespace Drupal\Tests\shortcut\Kernel\Plugin\migrate\source\d7;
4
5 use Drupal\Tests\migrate\Kernel\MigrateSqlSourceTestBase;
6
7 /**
8  * Tests D7 Shortcut source plugin.
9  *
10  * @covers Drupal\shortcut\Plugin\migrate\source\d7\Shortcut
11  *
12  * @group shortcut
13  */
14 class ShortcutTest extends MigrateSqlSourceTestBase {
15
16   /**
17    * {@inheritdoc}
18    */
19   public static $modules = ['shortcut', 'migrate_drupal'];
20
21   /**
22    * {@inheritdoc}
23    */
24   public function providerSource() {
25     $tests = [];
26
27     // The source data.
28     $tests[0]['source_data']['menu_links'] = [
29       [
30         'menu_name' => 'shortcut-set-2',
31         'mlid' => '473',
32         'plid' => '0',
33         'link_path' => 'admin/people',
34         'router_path' => 'admin/people',
35         'link_title' => 'People',
36         'options' => 'a:0:{}',
37         'module' => 'menu',
38         'hidden' => '0',
39         'external' => '0',
40         'has_children' => '0',
41         'expanded' => '0',
42         'weight' => '-50',
43         'depth' => '1',
44         'customized' => '0',
45         'p1' => '473',
46         'p2' => '0',
47         'p3' => '0',
48         'p4' => '0',
49         'p5' => '0',
50         'p6' => '0',
51         'p7' => '0',
52         'p8' => '0',
53         'p9' => '0',
54         'updated' => '0',
55       ]
56     ];
57
58     // The expected results.
59     $tests[0]['expected_data'] = [
60       [
61         'mlid' => '473',
62         'menu_name' => 'shortcut-set-2',
63         'link_path' => 'admin/people',
64         'link_title' => 'People',
65         'weight' => '-50',
66       ],
67     ];
68
69     return $tests;
70   }
71
72 }