Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / modules / statistics / tests / src / Kernel / Migrate / d7 / MigrateStatisticsConfigsTest.php
1 <?php
2
3 namespace Drupal\Tests\statistics\Kernel\Migrate\d7;
4
5 use Drupal\Tests\SchemaCheckTestTrait;
6 use Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase;
7
8 /**
9  * Upgrade variables to statistics.settings.yml.
10  *
11  * @group migrate_drupal_7
12  */
13 class MigrateStatisticsConfigsTest extends MigrateDrupal7TestBase {
14
15   use SchemaCheckTestTrait;
16
17   /**
18    * {@inheritdoc}
19    */
20   public static $modules = ['statistics'];
21
22   /**
23    * {@inheritdoc}
24    */
25   protected function setUp() {
26     parent::setUp();
27     $this->executeMigration('statistics_settings');
28   }
29
30   /**
31    * Tests migration of statistics variables to statistics.settings.yml.
32    */
33   public function testStatisticsSettings() {
34     $config = $this->config('statistics.settings');
35     $this->assertIdentical(1, $config->get('count_content_views'));
36     $this->assertConfigSchema(\Drupal::service('config.typed'), 'statistics.settings', $config->get());
37   }
38
39 }