diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php index 9a153796fc..898dd163d0 100644 --- a/core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/EntityTypeTest.php @@ -6,6 +6,7 @@ use Drupal\Core\Entity\Entity\EntityFormMode; use Drupal\Core\Entity\EntityType; use Drupal\Core\Entity\EntityTypeInterface; +use Drupal\Core\Language\LanguageDefault; use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\StringTranslation\TranslationManager; use Drupal\Tests\UnitTestCase; @@ -515,9 +516,7 @@ public function testIsSubClassOf() { public function testIsSerializable() { $entity_type = $this->setUpEntityType([]); - $translation = $this->prophesize(UnserializableTranslationManager::class); - $translation->__serialize()->willThrow(\Exception::class); - $translation_service = $translation->reveal(); + $translation_service = new UnserializableTranslationManager(new LanguageDefault([])); $translation_service->_serviceId = 'string_translation'; $entity_type->setStringTranslation($translation_service);