LocaleInstallTest.php

Same filename in other branches
  1. 10 core/modules/locale/tests/src/Functional/LocaleInstallTest.php

Namespace

Drupal\Tests\locale\Functional

File

core/modules/locale/tests/src/Functional/LocaleInstallTest.php

View source
<?php

declare (strict_types=1);
namespace Drupal\Tests\locale\Functional;

use Drupal\Tests\BrowserTestBase;

/**
 * Test installation of Locale module.
 *
 * @group locale
 */
class LocaleInstallTest extends BrowserTestBase {
    
    /**
     * {@inheritdoc}
     */
    protected static $modules = [
        'system',
        'file',
        'language',
    ];
    
    /**
     * {@inheritdoc}
     */
    protected $defaultTheme = 'stark';
    
    /**
     * Tests Locale install message.
     */
    public function testLocaleInstallMessage() : void {
        $admin_user = $this->drupalCreateUser([
            'access administration pages',
            'administer modules',
        ]);
        $this->drupalLogin($admin_user);
        $edit = [];
        $edit['modules[locale][enable]'] = 'locale';
        $this->drupalGet('admin/modules');
        $this->submitForm($edit, 'Install');
        $this->assertSession()
            ->statusMessageContains('available translations', 'status');
    }

}

Classes

Title Deprecated Summary
LocaleInstallTest Test installation of Locale module.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.