diff --git a/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php b/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php index d712beda8b..6d46b20778 100644 --- a/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php +++ b/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php @@ -478,14 +478,19 @@ public function testChangingContentLangcode() { $entity->save(); $content_moderation_state = ContentModerationState::loadFromModeratedEntity($entity); - $this->assertEquals(count($entity->getTranslationLanguages()), count($content_moderation_state->getTranslationLanguages())); + $this->assertCount(1, $entity->getTranslationLanguages()); + $this->assertCount(1, $content_moderation_state->getTranslationLanguages()); + $this->assertEquals('en', $entity->langcode->value); + $this->assertEquals('en', $content_moderation_state->langcode->value); $entity->langcode = 'fr'; $entity->save(); $content_moderation_state = ContentModerationState::loadFromModeratedEntity($entity); - $this->assertEquals(count($entity->getTranslationLanguages()), count($content_moderation_state->getTranslationLanguages())); - $this->assertEquals($entity->langcode->value, $content_moderation_state->langcode->value); + $this->assertCount(1, $entity->getTranslationLanguages()); + $this->assertCount(1, $content_moderation_state->getTranslationLanguages()); + $this->assertEquals('fr', $entity->langcode->value); + $this->assertEquals('fr', $content_moderation_state->langcode->value); } /**