LanguageListModuleInstallTest.php in Zircon Profile 8.0
File
core/modules/language/src/Tests/LanguageListModuleInstallTest.php
View source
<?php
namespace Drupal\language\Tests;
use Drupal\simpletest\WebTestBase;
class LanguageListModuleInstallTest extends WebTestBase {
public static $modules = array(
'language_test',
);
function testModuleInstallLanguageList() {
$admin_user = $this
->drupalCreateUser(array(
'access administration pages',
'administer modules',
));
$this
->drupalLogin($admin_user);
$edit = array();
$edit['modules[Multilingual][language][enable]'] = 'language';
$this
->drupalPostForm('admin/modules', $edit, t('Install'));
$this
->assertEqual(\Drupal::state()
->get('language_test.language_count_preinstall', 0), 1, 'Using LanguageManager::getLanguages() returns 1 language during Language installation.');
$this
->rebuildContainer();
$this
->assertTrue(\Drupal::moduleHandler()
->moduleExists('language'), 'Language module is enabled');
}
}