17b54fa1bc21a5e2eb535ad24325f2de5d7ca821
[yaffs-website] / web / core / modules / system / tests / src / Kernel / Plugin / migrate / source / d7 / ThemeSettingsTest.php
1 <?php
2
3 namespace Drupal\Tests\system\Kernel\Plugin\migrate\source\d7;
4
5 use Drupal\Tests\migrate\Kernel\MigrateSqlSourceTestBase;
6
7 /**
8  * Tests D7 theme settings source plugin.
9  *
10  * @covers Drupal\system\Plugin\migrate\source\d7\ThemeSettings
11  *
12  * @group system
13  */
14 class ThemeSettingsTest 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     $value = [
29       'toggle_logo' => 1,
30       'toggle_name' => 1,
31       'toggle_slogan' => 1,
32       'toggle_node_user_picture' => 1,
33       'toggle_comment_user_picture' => 1,
34       'toggle_comment_user_verification' => 1,
35       'toggle_favicon' => 1,
36       'toggle_main_menu' => 1,
37       'toggle_secondary_menu' => 1,
38       'default_logo' => 1,
39       'logo_path' => ' ',
40       'logo_upload' => ' ',
41       'default_favicon' => 1,
42       'favicon_path' => ' ',
43       'favicon_upload' => ' ',
44       'scheme' => 'firehouse',
45     ];
46
47     $tests[0]['source_data']['variable'] = [
48       [
49         'name' => 'theme_bartik_settings',
50         'value' => serialize($value),
51       ],
52     ];
53
54     // The expected results are nearly identical to the source data.
55     $tests[0]['expected_data'] = [
56       [
57         'name' => 'theme_bartik_settings',
58         'value' => $value,
59       ],
60     ];
61
62     return $tests;
63   }
64
65 }