protected function MigrateShortcutTest::assertEntity in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/shortcut/src/Tests/Migrate/d7/MigrateShortcutTest.php \Drupal\shortcut\Tests\Migrate\d7\MigrateShortcutTest::assertEntity()
Asserts various aspects of a shortcut entity.
Parameters
int $id: The shortcut ID.
string $title: The expected title of the shortcut.
int $weight: The expected weight of the shortcut.
string $url: The expected URL of the shortcut.
1 call to MigrateShortcutTest::assertEntity()
- MigrateShortcutTest::testShortcutMigration in core/
modules/ shortcut/ src/ Tests/ Migrate/ d7/ MigrateShortcutTest.php - Test the shortcut migration.
File
- core/
modules/ shortcut/ src/ Tests/ Migrate/ d7/ MigrateShortcutTest.php, line 59 - Contains \Drupal\shortcut\Tests\Migrate\d7\MigrateShortcutTest.
Class
- MigrateShortcutTest
- Test shortcut menu links migration to Shortcut entities.
Namespace
Drupal\shortcut\Tests\Migrate\d7Code
protected function assertEntity($id, $title, $weight, $url) {
$shortcut = Shortcut::load($id);
$this
->assertTrue($shortcut instanceof ShortcutInterface);
/** @var \Drupal\shortcut\ShortcutInterface $shortcut */
$this
->assertIdentical($title, $shortcut
->getTitle());
$this
->assertIdentical($weight, $shortcut
->getWeight());
$this
->assertIdentical($url, $shortcut
->getUrl()
->toString());
}