You are here

public function BundleInherit::fieldInstanceUpdate in Bundle Inherit 7

1 call to BundleInherit::fieldInstanceUpdate()
BundleInherit::testCRUD in ./bundle_inherit.test
Run complex CRUD test based on node entity type.

File

./bundle_inherit.test, line 88
Tests for bundle_inherit module.

Class

BundleInherit
@file Tests for bundle_inherit module.

Code

public function fieldInstanceUpdate() {
  $this->extraField['instance']['label'] = $this
    ->randomString();
  $this->extraField['instance']['required'] = TRUE;
  field_update_instance($this->extraField['instance']);
  $child_type_field_instance = field_info_instance('node', $this->extraField['field']['field_name'], $this->childType->type);
  $this
    ->assertTrue($this
    ->compareInstances($this->extraField['instance'], $child_type_field_instance), t('Child type field instance is equal to the parent one after updating.'));
}