public function PreExistingTermMultipleParentImportExportTest::testTermImportExport2 in Acquia Content Hub 8.2
Performs tests with taxonomy term with multiple parents.
This test uses 5 local terms and none of them imported. All the parents are local entities.
File
- tests/
src/ Kernel/ PreExistingTermMultipleParentImportExportTest.php, line 214
Class
- PreExistingTermMultipleParentImportExportTest
- Tests terms with multiple parents during export and import.
Namespace
Drupal\Tests\acquia_contenthub\KernelCode
public function testTermImportExport2() {
// All local terms exist. None are imported.
$terms = [
0,
1,
2,
3,
4,
];
$this
->createTerms($terms);
$this
->assertEquals(5, count($this->terms), 'Created 5 local taxonomy terms.');
// We're not going to use this expectation.
$this
->importFixture(0);
$document = $this
->createCdfDocumentFromFixture(0);
$imported_uuids = array_keys($document
->getEntities());
// Verify every taxonomy term.
$this
->verifyTaxonomyTerm(0, $imported_uuids, FALSE);
$this
->verifyTaxonomyTerm(1, $imported_uuids, FALSE);
$this
->verifyTaxonomyTerm(2, $imported_uuids, FALSE);
$this
->verifyTaxonomyTerm(3, $imported_uuids, FALSE);
$this
->verifyTaxonomyTerm(4, $imported_uuids, FALSE);
}