Commit 2f1e909a authored by alexpott's avatar alexpott

Issue #2211723 by yched, Berdir: FieldInstance::__construct() loads all field_config entities.

parent da6e4fd8
......@@ -87,12 +87,12 @@ public function testCalculateDependencies() {
->method('getConfigDependencyName')
->will($this->returnValue('field.field.test_entity_type.test_field'));
$field_storage = $this->getMock('\Drupal\Core\Config\Entity\ConfigEntityStorageInterface');
$field_storage
->expects($this->any())
->method('load')
->with('test_entity_type.test_field')
->will($this->returnValue($field));
$this->entityManager->expects($this->any())
->method('getFieldStorageDefinitions')
->with('test_entity_type')
->will($this->returnValue(array(
$field->name => $field,
)));
// Mock the interfaces necessary to create a dependency on a bundle entity.
$bundle_entity = $this->getMock('Drupal\Core\Config\Entity\ConfigEntityInterface');
......@@ -109,10 +109,8 @@ public function testCalculateDependencies() {
$this->entityManager->expects($this->any())
->method('getStorage')
->will($this->returnValueMap(array(
array('field_config', $field_storage),
array('bundle_entity_type', $storage),
)));
->with('bundle_entity_type')
->will($this->returnValue($storage));
$target_entity_type = $this->getMock('\Drupal\Core\Entity\EntityTypeInterface');
$target_entity_type->expects($this->any())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment