MigrateAggregatorItemTest.php in Zircon Profile 8.0
File
core/modules/aggregator/src/Tests/Migrate/d6/MigrateAggregatorItemTest.php
View source
<?php
namespace Drupal\aggregator\Tests\Migrate\d6;
use Drupal\aggregator\Entity\Item;
use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
class MigrateAggregatorItemTest extends MigrateDrupal6TestBase {
public static $modules = [
'aggregator',
];
protected function setUp() {
parent::setUp();
$this
->installEntitySchema('aggregator_feed');
$this
->installEntitySchema('aggregator_item');
$this
->executeMigrations([
'd6_aggregator_feed',
'd6_aggregator_item',
]);
}
public function testAggregatorItem() {
$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());
}
}