Upgraded drupal core with security updates
[yaffs-website] / web / core / modules / language / tests / src / Kernel / Plugin / migrate / source / d7 / LanguageContentSettingsTest.php
1 <?php
2
3 namespace Drupal\Tests\language\Kernel\Plugin\migrate\source\d7;
4
5 use Drupal\Tests\migrate\Kernel\MigrateSqlSourceTestBase;
6
7 /**
8  * Tests menu source plugin.
9  *
10  * @covers \Drupal\language\Plugin\migrate\source\d7\LanguageContentSettings
11  *
12  * @group language
13  */
14 class LanguageContentSettingsTest extends MigrateSqlSourceTestBase {
15
16   /**
17    * {@inheritdoc}
18    */
19   public static $modules = ['language', 'migrate_drupal'];
20
21   /**
22    * {@inheritdoc}
23    */
24   public function providerSource() {
25     $tests = [];
26
27     // The source data.
28     $tests[0]['source_data']['node_type'] = [
29       [
30         'type' => 'article',
31         'name' => 'Article',
32         'base' => 'node_content',
33         'module' => 'node',
34         'description' => 'Use <em>articles</em> for time-sensitive content like news, press releases or blog posts.',
35         'help' => 'Help text for articles',
36         'has_title' => 1,
37         'title_label' => 'Title',
38         'custom' => 1,
39         'modified' => 1,
40         'locked' => 0,
41         'disabled' => 0,
42         'orig_type' => 'article',
43       ],
44       [
45         'type' => 'blog',
46         'name' => 'Blog entry',
47         'base' => 'blog',
48         'module' => 'blog',
49         'description' => 'Use for multi-user blogs. Every user gets a personal blog.',
50         'help' => 'Blog away, good sir!',
51         'has_title' => 1,
52         'title_label' => 'Title',
53         'custom' => 0,
54         'modified' => 1,
55         'locked' => 1,
56         'disabled' => 0,
57         'orig_type' => 'blog',
58       ],
59     ];
60
61     foreach ($tests[0]['source_data']['node_type'] as $node_type) {
62       $tests[0]['expected_data'][] = [
63         'type' => $node_type['type'],
64         'language_content_type' => NULL,
65         'i18n_lock_node' => 0,
66       ];
67     }
68
69     return $tests;
70   }
71
72 }