3 namespace Drupal\Tests\color\Kernel\Migrate\d7;
5 use Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase;
8 * Tests migration of Color variables to configuration.
12 class MigrateColorTest extends MigrateDrupal7TestBase {
17 public static $modules = ['color'];
22 protected function setUp() {
24 // Install the themes used for this test.
25 $this->container->get('theme_installer')->install(['bartik']);
26 $this->executeMigration('d7_color');
30 * Tests migration of color's variables to configuration.
32 public function testMigrateColor() {
33 // Test Bartik migration.
34 $config = $this->config('color.theme.bartik');
36 'public://color/bartik-e0e23ad7/logo.png',
37 'public://color/bartik-e0e23ad7/colors.css',
39 $this->assertSame($files, $config->get('files'));
40 $this->assertSame('public://color/bartik-e0e23ad7/logo.png', $config->get('logo'));
43 'bottom' => '#c2c4c5',
45 'sidebar' => '#ffffff',
46 'sidebarborders' => '#cccccc',
47 'footer' => '#24272c',
48 'titleslogan' => '#000000',
52 $this->assertSame($palette, $config->get('palette'));
53 $this->assertSame(['public://color/bartik-e0e23ad7/colors.css'], $config->get('stylesheets'));
54 // Test that the screenshot was not migrated.
55 $this->assertNull($config->get('screenshot'));
57 // Test that garland was not migrated.
58 $this->assertEmpty(\Drupal::config('color.theme.garland')->get());