function FieldDiscoveryTest::testGetEntityFields
Same name in other branches
- 8.9.x core/modules/migrate_drupal/tests/src/Unit/FieldDiscoveryTest.php \Drupal\Tests\migrate_drupal\Unit\FieldDiscoveryTest::testGetEntityFields()
- 10 core/modules/migrate_drupal/tests/src/Unit/FieldDiscoveryTest.php \Drupal\Tests\migrate_drupal\Unit\FieldDiscoveryTest::testGetEntityFields()
- 11.x core/modules/migrate_drupal/tests/src/Unit/FieldDiscoveryTest.php \Drupal\Tests\migrate_drupal\Unit\FieldDiscoveryTest::testGetEntityFields()
Tests the protected getEntityFields method.
@covers ::getEntityFields @dataProvider getEntityFieldsData
Parameters
string $entity_type_id: The entity type ID.
array $expected_fields: The expected fields.
File
-
core/
modules/ migrate_drupal/ tests/ src/ Unit/ FieldDiscoveryTest.php, line 63
Class
- FieldDiscoveryTest
- Tests the FieldDiscovery Class.
Namespace
Drupal\Tests\migrate_drupal\UnitCode
public function testGetEntityFields($entity_type_id, array $expected_fields) {
$test_data = [
'getAllFields' => [
'7' => $this->getAllFieldData(),
],
];
$field_discovery = new FieldDiscoveryTestClass($this->fieldPluginManager
->reveal(), $this->migrationPluginManager
->reveal(), $this->logger
->reveal(), $test_data);
$actual_fields = $field_discovery->getEntityFields('7', $entity_type_id);
$this->assertSame($expected_fields, $actual_fields);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.