From 215ec59f0bb44cd8cab2af794b9a4a35b4ed1173 Mon Sep 17 00:00:00 2001 From: Santeri Hurnanen Date: Tue, 19 Dec 2023 11:30:18 +0200 Subject: [PATCH] UHF-9454: Fix tests --- tests/src/Functional/ServiceTranslationTest.php | 4 ++-- tests/src/Functional/UnitTranslationTest.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/src/Functional/ServiceTranslationTest.php b/tests/src/Functional/ServiceTranslationTest.php index 58e8dc99..1b0ecfb2 100644 --- a/tests/src/Functional/ServiceTranslationTest.php +++ b/tests/src/Functional/ServiceTranslationTest.php @@ -45,7 +45,7 @@ public function testPublish() : void { $this->drupalGet(Url::fromRoute('entity.tpr_service.edit_form', ['tpr_service' => 1]), [ 'query' => ['language' => 'fi'], ]); - $this->assertSession()->fieldValueEquals('content_translation[status]', $expected_status); + $this->assertSession()->fieldValueEquals('content_translation[status]', (string) $expected_status); } // Run migrate to update existing service entity and translations. @@ -65,7 +65,7 @@ public function testPublish() : void { $this->drupalGet(Url::fromRoute('entity.tpr_service.edit_form', ['tpr_service' => 1]), [ 'query' => ['language' => $language], ]); - $this->assertSession()->fieldValueEquals('content_translation[status]', $expected_status); + $this->assertSession()->fieldValueEquals('content_translation[status]', (string) $expected_status); } } } diff --git a/tests/src/Functional/UnitTranslationTest.php b/tests/src/Functional/UnitTranslationTest.php index c62abc99..932ce89b 100644 --- a/tests/src/Functional/UnitTranslationTest.php +++ b/tests/src/Functional/UnitTranslationTest.php @@ -45,7 +45,7 @@ public function testPublish() : void { $this->drupalGet(Url::fromRoute('entity.tpr_unit.edit_form', ['tpr_unit' => 1]), [ 'query' => ['language' => 'fi'], ]); - $this->assertSession()->fieldValueEquals('content_translation[status]', $expected_status); + $this->assertSession()->fieldValueEquals('content_translation[status]', (string) $expected_status); } // Run migrate to update existing unit entity andtranslations. @@ -65,7 +65,7 @@ public function testPublish() : void { $this->drupalGet(Url::fromRoute('entity.tpr_unit.edit_form', ['tpr_unit' => 1]), [ 'query' => ['language' => $language], ]); - $this->assertSession()->fieldValueEquals('content_translation[status]', $expected_status); + $this->assertSession()->fieldValueEquals('content_translation[status]', (string) $expected_status); } } }