Pull merge.
[yaffs-website] / web / core / modules / aggregator / tests / src / Kernel / Migrate / d7 / MigrateAggregatorSettingsTest.php
1 <?php
2
3 namespace Drupal\Tests\aggregator\Kernel\Migrate\d7;
4
5 use Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase;
6
7 /**
8  * Tests migration of Aggregator's variables to configuration.
9  *
10  * @group aggregator
11  */
12 class MigrateAggregatorSettingsTest extends MigrateDrupal7TestBase {
13
14   public static $modules = ['aggregator'];
15
16   /**
17    * {@inheritdoc}
18    */
19   protected function setUp() {
20     parent::setUp();
21     $this->installConfig(static::$modules);
22     $this->executeMigration('d7_aggregator_settings');
23   }
24
25   /**
26    * Tests migration of Aggregator variables to configuration.
27    */
28   public function testMigration() {
29     $config = \Drupal::config('aggregator.settings')->get();
30     $this->assertIdentical('aggregator', $config['fetcher']);
31     $this->assertIdentical('aggregator', $config['parser']);
32     $this->assertIdentical(['aggregator'], $config['processors']);
33     $this->assertIdentical('<p> <div> <a>', $config['items']['allowed_html']);
34     $this->assertIdentical(500, $config['items']['teaser_length']);
35     $this->assertIdentical(86400, $config['items']['expire']);
36     $this->assertIdentical(6, $config['source']['list_max']);
37   }
38
39 }