Commit dfbc9682 authored by catch's avatar catch

Issue #1561004 by marcingy, aries, yurtboy, Tor Arne Thune: Many tests still...

Issue #1561004 by marcingy, aries, yurtboy, Tor Arne Thune: Many tests still reference locale although they only need language module.
parent a8b58e86
......@@ -23,7 +23,7 @@ public static function getInfo() {
}
function setUp() {
parent::setUp('entity_test', 'language', 'locale');
parent::setUp('entity_test', 'locale');
// Enable translations for the test entity type.
variable_set('entity_test_translation', TRUE);
......
......@@ -424,7 +424,7 @@ class TextTranslationTestCase extends WebTestBase {
}
function setUp() {
parent::setUp('locale', 'translation');
parent::setUp('translation');
$full_html_format = filter_format_load('full_html');
$this->format = $full_html_format->format;
......
......@@ -50,7 +50,6 @@ function setUp() {
// is about the negotiation process which is solely in language module.
parent::setUp(array('locale', 'language_test', 'block'));
require_once DRUPAL_ROOT . '/core/includes/language.inc';
drupal_load('module', 'locale');
$admin_user = $this->drupalCreateUser(array('administer languages', 'translate interface', 'access administration pages', 'administer blocks'));
$this->drupalLogin($admin_user);
}
......
......@@ -20,7 +20,7 @@ public static function getInfo() {
}
function setUp() {
parent::setUp(array('locale'));
parent::setUp(array('language'));
// Create and login user.
$test_user = $this->drupalCreateUser(array('access content', 'search content', 'use advanced search', 'administer nodes', 'administer languages', 'access administration pages'));
......
......@@ -28,7 +28,7 @@ public static function getInfo() {
}
function setUp() {
parent::setUp('locale');
parent::setUp('language');
variable_set('configurable_timezones', 1);
variable_set('date_format_long', 'l, j. F Y - G:i');
variable_set('date_format_medium', 'j. F Y - G:i');
......
......@@ -22,7 +22,7 @@ public static function getInfo() {
}
function setUp() {
parent::setUp('system_test', 'locale');
parent::setUp('system_test', 'language');
}
function testDrupalHTTPRequest() {
......
......@@ -27,8 +27,8 @@ public static function getInfo() {
}
function setUp() {
// Enable Locale and SimpleTest in the test environment.
parent::setUp('locale', 'simpletest', 'common_test');
// Enable Language and SimpleTest in the test environment.
parent::setUp('language', 'simpletest', 'common_test');
// Disable preprocessing
$config = config('system.performance');
......
......@@ -442,29 +442,27 @@ class ModuleDependencyTestCase extends ModuleTestCase {
}
/**
* Attempt to enable translation module without locale enabled.
* Attempt to enable translation module without language enabled.
*/
function testEnableWithoutDependency() {
// Attempt to enable content translation without locale enabled.
// Attempt to enable content translation without language enabled.
$edit = array();
$edit['modules[Core][translation][enable]'] = 'translation';
$this->drupalPost('admin/modules', $edit, t('Save configuration'));
$this->assertText(t('Some required modules must be enabled'), t('Dependency required.'));
$this->assertModules(array('translation', 'locale', 'language'), FALSE);
$this->assertModules(array('translation', 'language'), FALSE);
// Assert that the locale tables weren't enabled.
// Assert that the language tables weren't enabled.
$this->assertTableCount('language', FALSE);
$this->assertTableCount('locale', FALSE);
$this->drupalPost(NULL, NULL, t('Continue'));
$this->assertText(t('The configuration options have been saved.'), t('Modules status has been updated.'));
$this->assertModules(array('translation', 'locale'), TRUE);
$this->assertModules(array('translation', 'language'), TRUE);
// Assert that the locale tables were enabled.
// Assert that the language tables were enabled.
$this->assertTableCount('language', TRUE);
$this->assertTableCount('locale', TRUE);
}
/**
......@@ -1224,7 +1222,7 @@ class DateTimeFunctionalTest extends WebTestBase {
}
function setUp() {
parent::setUp(array('locale'));
parent::setUp(array('language'));
// Create admin user and log in admin user.
$this->admin_user = $this->drupalCreateUser(array('administer site configuration'));
......
......@@ -27,7 +27,7 @@ public static function getInfo() {
}
function setUp() {
parent::setUp('language', 'locale', 'translation', 'translation_test');
parent::setUp('translation', 'translation_test');
// Setup users.
$this->admin_user = $this->drupalCreateUser(array('bypass node access', 'administer nodes', 'administer languages', 'administer content types', 'administer blocks', 'access administration pages', 'translate content'));
......
name = Content Translation
description = Allows content to be translated into different languages.
dependencies[] = locale
dependencies[] = language
package = Core
version = VERSION
core = 8.x
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment