MigrateAggregatorConfigsTest.php 1.5 KB
Newer Older
1 2 3 4
<?php

/**
 * @file
5
 * Contains \Drupal\aggregator\Tests\Migrate\d6\MigrateAggregatorConfigsTest.
6 7
 */

8
namespace Drupal\aggregator\Tests\Migrate\d6;
9

10
use Drupal\config\Tests\SchemaCheckTestTrait;
11
use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
12 13

/**
14 15
 * Upgrade variables to aggregator.settings.yml.
 *
16
 * @group migrate_drupal_6
17
 */
18
class MigrateAggregatorConfigsTest extends MigrateDrupal6TestBase {
19

20 21
  use SchemaCheckTestTrait;

22 23 24 25 26 27 28
  /**
   * Modules to enable.
   *
   * @var array
   */
  public static $modules = array('aggregator');

29
  /**
30
   * {@inheritdoc}
31
   */
32
  protected function setUp() {
33
    parent::setUp();
34
    $this->executeMigration('d6_aggregator_settings');
35 36 37 38 39 40
  }

  /**
   * Tests migration of aggregator variables to aggregator.settings.yml.
   */
  public function testAggregatorSettings() {
41
    $config = $this->config('aggregator.settings');
42 43 44 45 46 47 48
    $this->assertIdentical('aggregator', $config->get('fetcher'));
    $this->assertIdentical('aggregator', $config->get('parser'));
    $this->assertIdentical(array('aggregator'), $config->get('processors'));
    $this->assertIdentical(600, $config->get('items.teaser_length'));
    $this->assertIdentical('<a> <b> <br /> <dd> <dl> <dt> <em> <i> <li> <ol> <p> <strong> <u> <ul>', $config->get('items.allowed_html'));
    $this->assertIdentical(9676800, $config->get('items.expire'));
    $this->assertIdentical(3, $config->get('source.list_max'));
49
    $this->assertConfigSchema(\Drupal::service('config.typed'), 'aggregator.settings', $config->get());
50
  }
51

52
}