protected function MigrateFieldFormatterSettingsTest::assertComponent in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/field/src/Tests/Migrate/d7/MigrateFieldFormatterSettingsTest.php \Drupal\field\Tests\Migrate\d7\MigrateFieldFormatterSettingsTest::assertComponent()
Asserts various aspects of a particular component of a view display.
Parameters
string $display_id: The view display ID.
string $component_id: The component ID.
string $type: The expected component type (formatter plugin ID).
string $label: The expected label of the component.
int $weight: The expected weight of the component.
1 call to MigrateFieldFormatterSettingsTest::assertComponent()
- MigrateFieldFormatterSettingsTest::testMigration in core/
modules/ field/ src/ Tests/ Migrate/ d7/ MigrateFieldFormatterSettingsTest.php - Tests migration of D7 field formatter settings.
File
- core/
modules/ field/ src/ Tests/ Migrate/ d7/ MigrateFieldFormatterSettingsTest.php, line 186 - Contains \Drupal\field\Tests\Migrate\d7\MigrateFieldFormatterSettingsTest.
Class
- MigrateFieldFormatterSettingsTest
- Tests migration of D7 field formatter settings.
Namespace
Drupal\field\Tests\Migrate\d7Code
protected function assertComponent($display_id, $component_id, $type, $label, $weight) {
$component = EntityViewDisplay::load($display_id)
->getComponent($component_id);
$this
->assertTrue(is_array($component));
$this
->assertIdentical($type, $component['type']);
$this
->assertIdentical($label, $component['label']);
$this
->assertIdentical($weight, $component['weight']);
}