protected function InfiniteLoopTest::infiniteLoopTestHelper in Entity Share 8.3
Same name and namespace in other branches
- 8.2 modules/entity_share_client/tests/src/Functional/InfiniteLoopTest.php \Drupal\Tests\entity_share_client\Functional\InfiniteLoopTest::infiniteLoopTestHelper()
Helper function.
Parameters
array $selected_entities: The selected entities to pull.
1 call to InfiniteLoopTest::infiniteLoopTestHelper()
- InfiniteLoopTest::testInfiniteLoop in modules/
entity_share_client/ tests/ src/ Functional/ InfiniteLoopTest.php - Test that a referenced entity is pulled even if not selected.
File
- modules/
entity_share_client/ tests/ src/ Functional/ InfiniteLoopTest.php, line 134
Class
- InfiniteLoopTest
- Functional test class for infinite loop in content entity reference field.
Namespace
Drupal\Tests\entity_share_client\FunctionalCode
protected function infiniteLoopTestHelper(array $selected_entities) {
$this
->importSelectedEntities($selected_entities);
// Check that both entities had been created. If the process ends the
// infinite loop has been avoided.
$uuids = [
'es_test_content_reference_one',
'es_test_content_reference_two',
];
foreach ($uuids as $uuid) {
$node = $this
->loadEntity('node', $uuid);
$this
->assertTrue($node instanceof NodeInterface, 'The node with the uuid ' . $uuid . ' has been recreated.');
}
}