public function Update8001Test::testUpdateHook8001 in Field collection 8.3
Tests that the data still exists after the update.
File
- src/
Tests/ Update/ Update8001Test.php, line 26
Class
- Update8001Test
- Provides tests for converting field collections to entity references.
Namespace
Drupal\field_collection\Tests\UpdateCode
public function testUpdateHook8001() {
$this
->runUpdates();
$node = node_load(1);
$this
->assertIdentical($node->field_test_field_collection_1[0]->target_id, '1', 'field_collection_item value converted to target_id.');
$this
->assertIdentical($node->field_test_field_collection_1[2]->target_id, '3', 'field_collection_item value converted to target_id.');
$this
->assertIdentical($node->field_test_field_collection_2[0]->target_id, '4', 'field_collection_item value converted to target_id.');
$this
->assertIdentical($node->field_test_field_collection_2[2]->target_id, '6', 'field_collection_item value converted to target_id.');
}