3 namespace Drupal\Tests\aggregator\Kernel\Migrate\d6;
5 use Drupal\aggregator\Entity\Item;
6 use Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6TestBase;
9 * Tests migration of aggregator items.
11 * @group migrate_drupal_6
13 class MigrateAggregatorItemTest extends MigrateDrupal6TestBase {
18 public static $modules = ['aggregator'];
23 protected function setUp() {
25 $this->installEntitySchema('aggregator_feed');
26 $this->installEntitySchema('aggregator_item');
27 $this->executeMigrations(['d6_aggregator_feed', 'd6_aggregator_item']);
31 * Test Drupal 6 aggregator item migration to Drupal 8.
33 public function testAggregatorItem() {
34 /** @var \Drupal\aggregator\Entity\Item $item */
35 $item = Item::load(1);
36 $this->assertIdentical('1', $item->id());
37 $this->assertIdentical('5', $item->getFeedId());
38 $this->assertIdentical('This (three) weeks in Drupal Core - January 10th 2014', $item->label());
39 $this->assertIdentical('larowlan', $item->getAuthor());
40 $this->assertIdentical("<h2 id='new'>What's new with Drupal 8?</h2>", $item->getDescription());
41 $this->assertIdentical('https://groups.drupal.org/node/395218', $item->getLink());
42 $this->assertIdentical('1389297196', $item->getPostedTime());
43 $this->assertIdentical('en', $item->language()->getId());
44 $this->assertIdentical('395218 at https://groups.drupal.org', $item->getGuid());