diff --git a/core/modules/locale/tests/src/Functional/LocaleJavascriptTranslationTest.php b/core/modules/locale/tests/src/Functional/LocaleJavascriptTranslationTest.php index 5b146b4cba..bbb825832b 100644 --- a/core/modules/locale/tests/src/Functional/LocaleJavascriptTranslationTest.php +++ b/core/modules/locale/tests/src/Functional/LocaleJavascriptTranslationTest.php @@ -138,7 +138,7 @@ public function testLocaleTranslationJsDependencies() { $js_translation_files = \Drupal::state()->get('locale.translation.javascript'); $js_filename = $prefix . '_' . $js_translation_files[$prefix] . '.js'; - $content = $this->getSession()->getPage()->getcontent(); + $content = $this->getSession()->getPage()->getContent(); // Assert translations JS is included before drupal.js. $this->assertTrue(strpos($content, $js_filename) < strpos($content, 'core/misc/drupal.js'), 'Translations are included before Drupal.t.'); } diff --git a/core/modules/locale/tests/src/Functional/LocaleTranslationUiTest.php b/core/modules/locale/tests/src/Functional/LocaleTranslationUiTest.php index 2ff7cdf624..afea721cdc 100644 --- a/core/modules/locale/tests/src/Functional/LocaleTranslationUiTest.php +++ b/core/modules/locale/tests/src/Functional/LocaleTranslationUiTest.php @@ -317,7 +317,7 @@ public function testStringValidation() { $this->drupalPostForm('admin/config/regional/translate', $edit, t('Save translations')); // Check for a form error on the textarea. $form_class = $this->xpath('//form[@id="locale-translate-edit-form"]//textarea/@class'); - $this->assertNotIdentical(FALSE, strpos($form_class[0]->getText(), 'error'), 'The string was rejected as unsafe.'); + $this->assertContains('error', $form_class[0]->getText(), 'The string was rejected as unsafe.'); $this->assertNoText(t('The string has been saved.'), 'The string was not saved.'); } }