Pull merge.
[yaffs-website] / web / core / modules / aggregator / tests / src / Kernel / Migrate / d6 / MigrateAggregatorConfigsTest.php
1 <?php
2
3 namespace Drupal\Tests\aggregator\Kernel\Migrate\d6;
4
5 use Drupal\Tests\SchemaCheckTestTrait;
6 use Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6TestBase;
7
8 /**
9  * Upgrade variables to aggregator.settings.yml.
10  *
11  * @group migrate_drupal_6
12  */
13 class MigrateAggregatorConfigsTest extends MigrateDrupal6TestBase {
14
15   use SchemaCheckTestTrait;
16
17   /**
18    * {@inheritdoc}
19    */
20   public static $modules = ['aggregator'];
21
22   /**
23    * {@inheritdoc}
24    */
25   protected function setUp() {
26     parent::setUp();
27     $this->executeMigration('d6_aggregator_settings');
28   }
29
30   /**
31    * Tests migration of aggregator variables to aggregator.settings.yml.
32    */
33   public function testAggregatorSettings() {
34     $config = $this->config('aggregator.settings');
35     $this->assertIdentical('aggregator', $config->get('fetcher'));
36     $this->assertIdentical('aggregator', $config->get('parser'));
37     $this->assertIdentical(['aggregator'], $config->get('processors'));
38     $this->assertIdentical(600, $config->get('items.teaser_length'));
39     $this->assertIdentical('<a> <b> <br /> <dd> <dl> <dt> <em> <i> <li> <ol> <p> <strong> <u> <ul>', $config->get('items.allowed_html'));
40     $this->assertIdentical(9676800, $config->get('items.expire'));
41     $this->assertIdentical(3, $config->get('source.list_max'));
42     $this->assertConfigSchema(\Drupal::service('config.typed'), 'aggregator.settings', $config->get());
43   }
44
45 }