MigrateContactSettingsTest.php

Same filename in this branch
  1. 9 core/modules/contact/tests/src/Kernel/Migrate/d6/MigrateContactSettingsTest.php
Same filename in other branches
  1. 8.9.x core/modules/contact/tests/src/Kernel/Migrate/d6/MigrateContactSettingsTest.php
  2. 8.9.x core/modules/contact/tests/src/Kernel/Migrate/d7/MigrateContactSettingsTest.php
  3. 10 core/modules/contact/tests/src/Kernel/Migrate/d6/MigrateContactSettingsTest.php
  4. 10 core/modules/contact/tests/src/Kernel/Migrate/d7/MigrateContactSettingsTest.php
  5. 11.x core/modules/contact/tests/src/Kernel/Migrate/d6/MigrateContactSettingsTest.php
  6. 11.x core/modules/contact/tests/src/Kernel/Migrate/d7/MigrateContactSettingsTest.php

Namespace

Drupal\Tests\contact\Kernel\Migrate\d7

File

core/modules/contact/tests/src/Kernel/Migrate/d7/MigrateContactSettingsTest.php

View source
<?php

namespace Drupal\Tests\contact\Kernel\Migrate\d7;

use Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase;

/**
 * Tests migration of Contact settings to configuration.
 *
 * @group migrate_drupal_7
 */
class MigrateContactSettingsTest extends MigrateDrupal7TestBase {
    
    /**
     * {@inheritdoc}
     */
    protected static $modules = [
        'contact',
    ];
    
    /**
     * {@inheritdoc}
     */
    protected function setUp() : void {
        parent::setUp();
        $this->executeMigration('contact_category');
        $this->executeMigration('d7_contact_settings');
    }
    
    /**
     * Tests migration of Contact's variables to configuration.
     */
    public function testContactSettings() {
        $config = $this->config('contact.settings');
        $this->assertTrue($config->get('user_default_enabled'));
        $this->assertSame(33, $config->get('flood.limit'));
        $this->assertEquals('website_testing', $config->get('default_form'));
    }

}

Classes

Title Deprecated Summary
MigrateContactSettingsTest Tests migration of Contact settings to configuration.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.