You are here

public function MigrateAggregatorItemTest::testAggregatorItem in Drupal 8

Same name in this branch
  1. 8 core/modules/aggregator/tests/src/Kernel/Migrate/d6/MigrateAggregatorItemTest.php \Drupal\Tests\aggregator\Kernel\Migrate\d6\MigrateAggregatorItemTest::testAggregatorItem()
  2. 8 core/modules/aggregator/tests/src/Kernel/Migrate/d7/MigrateAggregatorItemTest.php \Drupal\Tests\aggregator\Kernel\Migrate\d7\MigrateAggregatorItemTest::testAggregatorItem()
Same name and namespace in other branches
  1. 9 core/modules/aggregator/tests/src/Kernel/Migrate/d6/MigrateAggregatorItemTest.php \Drupal\Tests\aggregator\Kernel\Migrate\d6\MigrateAggregatorItemTest::testAggregatorItem()

Test Drupal 6 aggregator item migration to Drupal 8.

File

core/modules/aggregator/tests/src/Kernel/Migrate/d6/MigrateAggregatorItemTest.php, line 33

Class

MigrateAggregatorItemTest
Tests migration of aggregator items.

Namespace

Drupal\Tests\aggregator\Kernel\Migrate\d6

Code

public function testAggregatorItem() {

  /** @var \Drupal\aggregator\Entity\Item $item */
  $item = Item::load(1);
  $this
    ->assertIdentical('1', $item
    ->id());
  $this
    ->assertIdentical('5', $item
    ->getFeedId());
  $this
    ->assertIdentical('This (three) weeks in Drupal Core - January 10th 2014', $item
    ->label());
  $this
    ->assertIdentical('larowlan', $item
    ->getAuthor());
  $this
    ->assertIdentical("<h2 id='new'>What's new with Drupal 8?</h2>", $item
    ->getDescription());
  $this
    ->assertIdentical('https://groups.drupal.org/node/395218', $item
    ->getLink());
  $this
    ->assertIdentical('1389297196', $item
    ->getPostedTime());
  $this
    ->assertIdentical('en', $item
    ->language()
    ->getId());
  $this
    ->assertIdentical('395218 at https://groups.drupal.org', $item
    ->getGuid());
}