summaryrefslogtreecommitdiff
path: root/modules/locale/locale.test
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-10-05 17:57:09 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-10-05 17:57:09 +0000
commit0614a78538bcc91f620abb38a0366d6ecee9eb06 (patch)
tree1ec0a02d33f0ea6eb4f3dec861a2a622fcc7bc3a /modules/locale/locale.test
parentb6fd2cd427ea059d92b85b8e378a2f644aa01089 (diff)
downloadbrdo-0614a78538bcc91f620abb38a0366d6ecee9eb06.tar.gz
brdo-0614a78538bcc91f620abb38a0366d6ecee9eb06.tar.bz2
#780318 by plach: Fixed path prefixes are always active on multilingual sites.
Diffstat (limited to 'modules/locale/locale.test')
-rw-r--r--modules/locale/locale.test17
1 files changed, 13 insertions, 4 deletions
diff --git a/modules/locale/locale.test b/modules/locale/locale.test
index d996fb120..20bf5a292 100644
--- a/modules/locale/locale.test
+++ b/modules/locale/locale.test
@@ -1170,10 +1170,9 @@ class LocaleLanguageSwitchingFunctionalTest extends DrupalWebTestCase {
);
$this->drupalPost('admin/config/regional/language/add', $edit, t('Add language'));
- // Set language negotiation.
- drupal_load('module', 'locale');
- include_once DRUPAL_ROOT . '/includes/language.inc';
- language_negotiation_set($language_type, locale_language_negotiation_info());
+ // Enable URL language detection and selection.
+ $edit = array('language[enabled][locale-url]' => '1');
+ $this->drupalPost('admin/config/regional/language/configure', $edit, t('Save settings'));
// Assert that the language switching block is displayed on the frontpage.
$this->drupalGet('');
@@ -1452,6 +1451,12 @@ class LocalePathFunctionalTest extends DrupalWebTestCase {
);
$this->drupalPost('admin/config/regional/language/add', $edit, t('Add custom language'));
+ // Check that the "xx" front page is not available when path prefixes are
+ // not enabled yet.
+ $this->drupalPost('admin/config/regional/language/configure', array(), t('Save settings'));
+ $this->drupalGet($prefix);
+ $this->assertResponse(404, t('The "xx" front page is not available yet.'));
+
// Enable URL language detection and selection.
$edit = array('language[enabled][locale-url]' => 1);
$this->drupalPost('admin/config/regional/language/configure', $edit, t('Save settings'));
@@ -1835,6 +1840,10 @@ class LocaleMultilingualFieldsFunctionalTest extends DrupalWebTestCase {
require_once DRUPAL_ROOT . '/includes/locale.inc';
locale_add_language('it', 'Italian', 'Italiano', LANGUAGE_LTR, '', '', TRUE, FALSE);
+ // Enable URL language detection and selection.
+ $edit = array('language[enabled][locale-url]' => '1');
+ $this->drupalPost('admin/config/regional/language/configure', $edit, t('Save settings'));
+
// Set "Basic page" content type to use multilingual support.
$edit = array(
'language_content_type' => 1,