class MigrateForumSettingsTest
Same name and namespace in other branches
- 10 core/modules/forum/tests/src/Kernel/Migrate/d7/MigrateForumSettingsTest.php \Drupal\Tests\forum\Kernel\Migrate\d7\MigrateForumSettingsTest
- 8.9.x core/modules/forum/tests/src/Kernel/Migrate/d7/MigrateForumSettingsTest.php \Drupal\Tests\forum\Kernel\Migrate\d7\MigrateForumSettingsTest
Tests migration of Forum's variables to configuration.
@group forum
Hierarchy
- class \Drupal\KernelTests\KernelTestBase implements \Drupal\Core\DependencyInjection\ServiceProviderInterface uses \Drupal\KernelTests\AssertLegacyTrait, \Drupal\KernelTests\AssertContentTrait, \Drupal\Tests\RandomGeneratorTrait, \Drupal\Tests\ConfigTestTrait, \Drupal\Tests\ExtensionListTestTrait, \Drupal\Tests\TestRequirementsTrait, \Drupal\Tests\Traits\PhpUnitWarnings, \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait extends \PHPUnit\Framework\TestCase
- class \Drupal\Tests\migrate\Kernel\MigrateTestBase implements \Drupal\migrate\MigrateMessageInterface extends \Drupal\KernelTests\KernelTestBase
- class \Drupal\Tests\migrate_drupal\Kernel\MigrateDrupalTestBase extends \Drupal\Tests\migrate\Kernel\MigrateTestBase
- class \Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase uses \Drupal\Tests\migrate_drupal\Traits\NodeMigrateTypeTestTrait extends \Drupal\Tests\migrate_drupal\Kernel\MigrateDrupalTestBase
- class \Drupal\Tests\forum\Kernel\Migrate\d7\MigrateForumSettingsTest extends \Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase
- class \Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase uses \Drupal\Tests\migrate_drupal\Traits\NodeMigrateTypeTestTrait extends \Drupal\Tests\migrate_drupal\Kernel\MigrateDrupalTestBase
- class \Drupal\Tests\migrate_drupal\Kernel\MigrateDrupalTestBase extends \Drupal\Tests\migrate\Kernel\MigrateTestBase
- class \Drupal\Tests\migrate\Kernel\MigrateTestBase implements \Drupal\migrate\MigrateMessageInterface extends \Drupal\KernelTests\KernelTestBase
Expanded class hierarchy of MigrateForumSettingsTest
File
-
core/
modules/ forum/ tests/ src/ Kernel/ Migrate/ d7/ MigrateForumSettingsTest.php, line 12
Namespace
Drupal\Tests\forum\Kernel\Migrate\d7View source
class MigrateForumSettingsTest extends MigrateDrupal7TestBase {
/**
* Modules to enable.
*
* Don't alphabetize these. They're in dependency order.
*
* @var array
*/
protected static $modules = [
'comment',
'field',
'filter',
'text',
'node',
'taxonomy',
'forum',
];
/**
* {@inheritdoc}
*/
protected function setUp() : void {
parent::setUp();
$this->executeMigration('d7_taxonomy_vocabulary');
$this->executeMigration('d7_forum_settings');
}
/**
* Tests the migration of Forum's settings to configuration.
*/
public function testForumSettingsMigration() {
$config = $this->config('forum.settings');
$this->assertSame(9, $config->get('block.active.limit'));
$this->assertSame(4, $config->get('block.new.limit'));
$this->assertSame(10, $config->get('topics.hot_threshold'));
$this->assertSame(25, $config->get('topics.page_limit'));
$this->assertSame(1, $config->get('topics.order'));
$this->assertSame('forums', $config->get('vocabulary'));
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.