protected function FieldFormatterSettingsTest::assertComponent in Commerce Migrate 8.2
Same name in this branch
- 8.2 modules/ubercart/tests/src/Kernel/Migrate/uc7/FieldFormatterSettingsTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc7\FieldFormatterSettingsTest::assertComponent()
- 8.2 modules/ubercart/tests/src/Kernel/Migrate/uc6/FieldFormatterSettingsTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc6\FieldFormatterSettingsTest::assertComponent()
- 8.2 modules/commerce/tests/src/Kernel/Migrate/commerce1/FieldFormatterSettingsTest.php \Drupal\Tests\commerce_migrate_commerce\Kernel\Migrate\commerce1\FieldFormatterSettingsTest::assertComponent()
Same name and namespace in other branches
- 3.1.x modules/ubercart/tests/src/Kernel/Migrate/uc6/FieldFormatterSettingsTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc6\FieldFormatterSettingsTest::assertComponent()
- 3.0.x modules/ubercart/tests/src/Kernel/Migrate/uc6/FieldFormatterSettingsTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc6\FieldFormatterSettingsTest::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 FieldFormatterSettingsTest::assertComponent()
- FieldFormatterSettingsTest::testEntityDisplaySettings in modules/
ubercart/ tests/ src/ Kernel/ Migrate/ uc6/ FieldFormatterSettingsTest.php - Test that product entity display are migrated to product entities.
File
- modules/
ubercart/ tests/ src/ Kernel/ Migrate/ uc6/ FieldFormatterSettingsTest.php, line 76
Class
- FieldFormatterSettingsTest
- Migrate field instance tests.
Namespace
Drupal\Tests\commerce_migrate_ubercart\Kernel\Migrate\uc6Code
protected function assertComponent($display_id, $component_id, $type, $label, $weight) {
$component = EntityViewDisplay::load($display_id)
->getComponent($component_id);
$this
->assertTrue(is_array($component));
$this
->assertSame($type, $component['type']);
$this
->assertSame($label, $component['label']);
$this
->assertSame($weight, $component['weight']);
}