diff --git a/core/modules/field_ui/src/Tests/EntityDisplayTest.php b/core/modules/field_ui/src/Tests/EntityDisplayTest.php index 495b8e7..926f1c9 100644 --- a/core/modules/field_ui/src/Tests/EntityDisplayTest.php +++ b/core/modules/field_ui/src/Tests/EntityDisplayTest.php @@ -116,10 +116,10 @@ public function testEntityDisplayCRUDSort() { $display->setComponent('component_3'); $display->setComponent('component_1'); $display->setComponent('component_2'); - $display->removeComponent('name'); $display->save(); $components = array_keys($display->getComponents()); - $expected = array ( 0 => 'component_1', 1 => 'component_2', 2 => 'component_3',); + // The name field is not configurable so will be added automatically. + $expected = array ( 0 => 'component_1', 1 => 'component_2', 2 => 'component_3', 'name'); $this->assertIdentical($components, $expected); } diff --git a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php index e0083e4..c4413eb 100644 --- a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php +++ b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php @@ -279,6 +279,9 @@ public function testSaveInsert(EntityInterface $entity) { ->method('setData'); $config_object->expects($this->once()) ->method('save'); + $config_object->expects($this->atLeastOnce()) + ->method('get') + ->willReturn([]); $this->cacheTagsInvalidator->expects($this->once()) ->method('invalidateTags') @@ -343,6 +346,9 @@ public function testSaveUpdate(EntityInterface $entity) { ->method('setData'); $config_object->expects($this->once()) ->method('save'); + $config_object->expects($this->atLeastOnce()) + ->method('get') + ->willReturn([]); $this->cacheTagsInvalidator->expects($this->once()) ->method('invalidateTags') @@ -408,6 +414,9 @@ public function testSaveRename(ConfigEntityInterface $entity) { ->method('setData'); $config_object->expects($this->once()) ->method('save'); + $config_object->expects($this->atLeastOnce()) + ->method('get') + ->willReturn([]); $this->cacheTagsInvalidator->expects($this->once()) ->method('invalidateTags') @@ -546,6 +555,9 @@ public function testSaveNoMismatch() { ->will($this->returnValue(TRUE)); $config_object->expects($this->once()) ->method('save'); + $config_object->expects($this->atLeastOnce()) + ->method('get') + ->willReturn([]); $this->cacheTagsInvalidator->expects($this->once()) ->method('invalidateTags')