class MigrateAggregatorItemTest
Same name in this branch
- 9 core/modules/aggregator/tests/src/Kernel/Migrate/d7/MigrateAggregatorItemTest.php \Drupal\Tests\aggregator\Kernel\Migrate\d7\MigrateAggregatorItemTest
Tests migration of aggregator items.
@group aggregator @group legacy
Hierarchy
- class \Drupal\KernelTests\KernelTestBase extends \Drupal\Core\DependencyInjection\ServiceProviderInterface uses \Drupal\KernelTests\AssertLegacyTrait, \Drupal\KernelTests\AssertContentTrait, \Drupal\Tests\RandomGeneratorTrait, \Drupal\Tests\ConfigTestTrait, \Drupal\Tests\ExtensionListTestTrait, \Drupal\Tests\TestRequirementsTrait, \Drupal\Tests\Traits\PhpUnitWarnings, \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait implements \PHPUnit\Framework\TestCase
- class \Drupal\Tests\migrate\Kernel\MigrateTestBase extends \Drupal\migrate\MigrateMessageInterface implements \Drupal\KernelTests\KernelTestBase
- class \Drupal\Tests\migrate_drupal\Kernel\MigrateDrupalTestBase implements \Drupal\Tests\migrate\Kernel\MigrateTestBase
- class \Drupal\Tests\aggregator\Kernel\Migrate\d6\MigrateDrupal6TestBase uses \Drupal\Tests\migrate_drupal\Traits\NodeMigrateTypeTestTrait implements \Drupal\Tests\migrate_drupal\Kernel\MigrateDrupalTestBase
- class \Drupal\Tests\aggregator\Kernel\Migrate\d6\MigrateAggregatorItemTest implements \Drupal\Tests\aggregator\Kernel\Migrate\d6\MigrateDrupal6TestBase
- class \Drupal\Tests\aggregator\Kernel\Migrate\d6\MigrateDrupal6TestBase uses \Drupal\Tests\migrate_drupal\Traits\NodeMigrateTypeTestTrait implements \Drupal\Tests\migrate_drupal\Kernel\MigrateDrupalTestBase
- class \Drupal\Tests\migrate_drupal\Kernel\MigrateDrupalTestBase implements \Drupal\Tests\migrate\Kernel\MigrateTestBase
- class \Drupal\Tests\migrate\Kernel\MigrateTestBase extends \Drupal\migrate\MigrateMessageInterface implements \Drupal\KernelTests\KernelTestBase
Expanded class hierarchy of MigrateAggregatorItemTest
File
-
core/
modules/ aggregator/ tests/ src/ Kernel/ Migrate/ d6/ MigrateAggregatorItemTest.php, line 13
Namespace
Drupal\Tests\aggregator\Kernel\Migrate\d6View source
class MigrateAggregatorItemTest extends MigrateDrupal6TestBase {
/**
* {@inheritdoc}
*/
protected function setUp() : void {
parent::setUp();
$this->installEntitySchema('aggregator_feed');
$this->installEntitySchema('aggregator_item');
$this->executeMigrations([
'd6_aggregator_feed',
'd6_aggregator_item',
]);
}
/**
* Tests Drupal 6 aggregator item migration to Drupal 8.
*/
public function testAggregatorItem() {
/** @var \Drupal\aggregator\Entity\Item $item */
$item = Item::load(1);
$this->assertSame('1', $item->id());
$this->assertSame('5', $item->getFeedId());
$this->assertSame('This (three) weeks in Drupal Core - January 10th 2014', $item->label());
$this->assertSame('larowlan', $item->getAuthor());
$this->assertSame("<h2 id='new'>What's new with Drupal 8?</h2>", $item->getDescription());
$this->assertSame('https://groups.drupal.org/node/395218', $item->getLink());
$this->assertSame('1389297196', $item->getPostedTime());
$this->assertSame('en', $item->language()
->getId());
$this->assertSame('395218 at https://groups.drupal.org', $item->getGuid());
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.