Commit 2958fe12 authored by Project Update Bot's avatar Project Update Bot Committed by Mats Blakstad
Browse files

Issue #3288203 by Project Update Bot: Automated Drupal 10 compatibility fixes

parent 6648f173
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
name: 'Language Combination'
description: 'Provides a field that allows users to select language combinations.'
type: module
core: '8.x'
core_version_requirement: ^8 || ^9
core_version_requirement: ^9.1 || ^10
package: 'Field types'
dependencies:
  - drupal:language
+8 −5
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ class LanguageCombinationTest extends BrowserTestBase {
  /**
   * {@inheritdoc}
   */
  public static $modules = [
  protected static $modules = [
    'field',
    'node',
    'language',
@@ -34,7 +34,7 @@ class LanguageCombinationTest extends BrowserTestBase {
  /**
   * {@inheritdoc}
   */
  public function setUp() {
  public function setUp(): void {
    parent::setUp();

    $user = $this->drupalCreateUser([
@@ -94,7 +94,8 @@ class LanguageCombinationTest extends BrowserTestBase {
      'language_combination[0][language_source]' => 'fr',
      'language_combination[0][language_target]' => 'fr',
    ];
    $this->drupalPostForm('node/add/article', $edit, t('Save'));
    $this->drupalGet('node/add/article');
    $this->submitForm($edit, t('Save'));
    $this->assertSession()->pageTextContains("The 'from' and 'to' language fields can't have the same value.");
  }

@@ -108,7 +109,8 @@ class LanguageCombinationTest extends BrowserTestBase {
      'language_combination[0][language_source]' => 'fr',
      'language_combination[0][language_target]' => 'de',
    ];
    $this->drupalPostForm('node/add/article', $edit, t('Save'));
    $this->drupalGet('node/add/article');
    $this->submitForm($edit, t('Save'));
    $this->assertSession()->pageTextContains('French to German');
  }

@@ -124,7 +126,8 @@ class LanguageCombinationTest extends BrowserTestBase {
      'language_combination[1][language_source]' => 'en',
      'language_combination[1][language_target]' => 'de',
    ];
    $this->drupalPostForm('node/add/article', $edit, t('Save'));
    $this->drupalGet('node/add/article');
    $this->submitForm($edit, t('Save'));

    $node = \Drupal::entityTypeManager()->getStorage('node')->load('1');