diff --git a/core/modules/editor/src/Tests/EditorFileUsageTest.php b/core/modules/editor/src/Tests/EditorFileUsageTest.php
index 7c0ba3b..b2baa40 100644
--- a/core/modules/editor/src/Tests/EditorFileUsageTest.php
+++ b/core/modules/editor/src/Tests/EditorFileUsageTest.php
@@ -103,6 +103,11 @@ public function testEditorEntityHooks() {
     entity_revision_delete('node', $second_revision_id);
     $this->assertIdentical(array('editor' => array('node' => array(1 => '2'))), $file_usage->listUsage($image), 'The image has 2 usages.');
 
+    // Test hook_entity_update() by adding an invalid data- attribute.
+    $node->get('body')->first()->get('value')->setValue($original_value . '<img src="awesome-llama.jpg" data-editor-file-uuid="invalid-file-uuid" />');
+    $node->save();
+    $this->assertIdentical(array('editor' => array('node' => array(1 => '2'))), $file_usage->listUsage($image), 'The image still has 2 usages.');
+
     // Test editor_entity_delete().
     $node->delete();
     $this->assertIdentical(array(), $file_usage->listUsage($image), 'The image has zero usages again.');
