MigrateStatisticsConfigsTest.php in Drupal 10
Same filename in this branch
Same filename and directory in other branches
File
core/modules/statistics/tests/src/Kernel/Migrate/d6/MigrateStatisticsConfigsTest.phpView source
<?php
namespace Drupal\Tests\statistics\Kernel\Migrate\d6;
use Drupal\Tests\SchemaCheckTestTrait;
use Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6TestBase;
/**
* Upgrade variables to statistics.settings.yml.
*
* @group migrate_drupal_6
*/
class MigrateStatisticsConfigsTest extends MigrateDrupal6TestBase {
use SchemaCheckTestTrait;
/**
* {@inheritdoc}
*/
protected static $modules = [
'statistics',
];
/**
* {@inheritdoc}
*/
protected function setUp() : void {
parent::setUp();
$this
->executeMigration('statistics_settings');
}
/**
* Tests migration of statistics variables to statistics.settings.yml.
*/
public function testStatisticsSettings() {
$config = $this
->config('statistics.settings');
$this
->assertSame(1, $config
->get('count_content_views'));
$this
->assertConfigSchema(\Drupal::service('config.typed'), 'statistics.settings', $config
->get());
}
}
Classes
Name | Description |
---|---|
MigrateStatisticsConfigsTest | Upgrade variables to statistics.settings.yml. |