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() { ...@@ -87,12 +87,12 @@ public function testCalculateDependencies() {
->method('getConfigDependencyName') ->method('getConfigDependencyName')
->will($this->returnValue('field.field.test_entity_type.test_field')); ->will($this->returnValue('field.field.test_entity_type.test_field'));
$field_storage = $this->getMock('\Drupal\Core\Config\Entity\ConfigEntityStorageInterface'); $this->entityManager->expects($this->any())
$field_storage ->method('getFieldStorageDefinitions')
->expects($this->any()) ->with('test_entity_type')
->method('load') ->will($this->returnValue(array(
->with('test_entity_type.test_field') $field->name => $field,
->will($this->returnValue($field)); )));
// Mock the interfaces necessary to create a dependency on a bundle entity. // Mock the interfaces necessary to create a dependency on a bundle entity.
$bundle_entity = $this->getMock('Drupal\Core\Config\Entity\ConfigEntityInterface'); $bundle_entity = $this->getMock('Drupal\Core\Config\Entity\ConfigEntityInterface');
...@@ -109,10 +109,8 @@ public function testCalculateDependencies() { ...@@ -109,10 +109,8 @@ public function testCalculateDependencies() {
$this->entityManager->expects($this->any()) $this->entityManager->expects($this->any())
->method('getStorage') ->method('getStorage')
->will($this->returnValueMap(array( ->with('bundle_entity_type')
array('field_config', $field_storage), ->will($this->returnValue($storage));
array('bundle_entity_type', $storage),
)));
$target_entity_type = $this->getMock('\Drupal\Core\Entity\EntityTypeInterface'); $target_entity_type = $this->getMock('\Drupal\Core\Entity\EntityTypeInterface');
$target_entity_type->expects($this->any()) $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