class LocaleUpdateDevelopmentReleaseTest in Drupal 10
Same name and namespace in other branches
- 8 core/modules/locale/tests/src/Functional/LocaleUpdateDevelopmentReleaseTest.php \Drupal\Tests\locale\Functional\LocaleUpdateDevelopmentReleaseTest
- 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
- class \Drupal\Tests\BrowserTestBase extends \PHPUnit\Framework\TestCase uses \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait, FunctionalTestSetupTrait, TestSetupTrait, BlockCreationTrait, ConfigTestTrait, ExtensionListTestTrait, ContentTypeCreationTrait, NodeCreationTrait, RandomGeneratorTrait, TestRequirementsTrait, PhpUnitWarnings, UiHelperTrait, UserCreationTrait, XdebugRequestTrait
- class \Drupal\Tests\locale\Functional\LocaleUpdateDevelopmentReleaseTest
Expanded class hierarchy of LocaleUpdateDevelopmentReleaseTest
File
- core/
modules/ locale/ tests/ src/ Functional/ LocaleUpdateDevelopmentReleaseTest.php, line 12
Namespace
Drupal\Tests\locale\FunctionalView 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.');
}
}