You are here

class LocaleUpdateDevelopmentReleaseTest in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/locale/tests/src/Functional/LocaleUpdateDevelopmentReleaseTest.php \Drupal\Tests\locale\Functional\LocaleUpdateDevelopmentReleaseTest
  2. 9 core/modules/locale/tests/src/Functional/LocaleUpdateDevelopmentReleaseTest.php \Drupal\Tests\locale\Functional\LocaleUpdateDevelopmentReleaseTest

Test for proper version fallback in case of a development release.

@group language

Hierarchy

Expanded class hierarchy of LocaleUpdateDevelopmentReleaseTest

File

core/modules/locale/tests/src/Functional/LocaleUpdateDevelopmentReleaseTest.php, line 12

Namespace

Drupal\Tests\locale\Functional
View source
class LocaleUpdateDevelopmentReleaseTest extends BrowserTestBase {
  protected static $modules = [
    'locale',
    'locale_test_development_release',
  ];

  /**
   * {@inheritdoc}
   */
  protected $defaultTheme = 'stark';
  protected function setUp() : void {
    parent::setUp();
    \Drupal::moduleHandler()
      ->loadInclude('locale', 'inc', 'locale.compare');
    $admin_user = $this
      ->drupalCreateUser([
      'administer modules',
      'administer languages',
      'access administration pages',
      'translate interface',
    ]);
    $this
      ->drupalLogin($admin_user);
    $this
      ->drupalGet('admin/config/regional/language/add');
    $this
      ->submitForm([
      'predefined_langcode' => 'hu',
    ], 'Add language');
  }
  public function testLocaleUpdateDevelopmentRelease() {
    $projects = locale_translation_build_projects();
    $this
      ->assertEquals('8.0.x', $projects['drupal']->info['version'], 'The branch of the core dev release.');
    $this
      ->assertEquals('12.x-10.x', $projects['contrib']->info['version'], 'The branch of the contrib module dev release.');
  }

}

Members