summaryrefslogtreecommitdiff
path: root/modules/simpletest
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-12-02 19:26:23 +0000
committerDries Buytaert <dries@buytaert.net>2009-12-02 19:26:23 +0000
commit0baad49d620d9988837287cb5942eea764d3ed6f (patch)
tree146072f69b433cb7922572ba2ac627a83987edd4 /modules/simpletest
parentef4513651e210784ba84eb310cf919e26f668bed (diff)
downloadbrdo-0baad49d620d9988837287cb5942eea764d3ed6f.tar.gz
brdo-0baad49d620d9988837287cb5942eea764d3ed6f.tar.bz2
- Patch #635094 by plach: unify 'language neutral' language codes.
Diffstat (limited to 'modules/simpletest')
-rw-r--r--modules/simpletest/drupal_web_test_case.php8
-rw-r--r--modules/simpletest/tests/common.test2
2 files changed, 5 insertions, 5 deletions
diff --git a/modules/simpletest/drupal_web_test_case.php b/modules/simpletest/drupal_web_test_case.php
index d70304d7f..55f559f39 100644
--- a/modules/simpletest/drupal_web_test_case.php
+++ b/modules/simpletest/drupal_web_test_case.php
@@ -696,8 +696,8 @@ class DrupalWebTestCase extends DrupalTestCase {
protected function drupalCreateNode($settings = array()) {
// Populate defaults array.
$settings += array(
- 'body' => array(FIELD_LANGUAGE_NONE => array(array())),
- 'title' => array(FIELD_LANGUAGE_NONE => array(array('value' => $this->randomName(8)))),
+ 'body' => array(LANGUAGE_NONE => array(array())),
+ 'title' => array(LANGUAGE_NONE => array(array('value' => $this->randomName(8)))),
'comment' => 2,
'changed' => REQUEST_TIME,
'moderate' => 0,
@@ -709,6 +709,7 @@ class DrupalWebTestCase extends DrupalTestCase {
'type' => 'page',
'revisions' => NULL,
'taxonomy' => NULL,
+ 'language' => LANGUAGE_NONE,
);
// Use the original node's created time for existing nodes.
@@ -733,8 +734,7 @@ class DrupalWebTestCase extends DrupalTestCase {
'value' => $this->randomName(32),
'format' => filter_default_format(),
);
- $langcode = !empty($settings['language']) ? $settings['language'] : FIELD_LANGUAGE_NONE;
- $settings['body'][$langcode][0] += $body;
+ $settings['body'][$settings['language']][0] += $body;
$node = (object) $settings;
node_save($node);
diff --git a/modules/simpletest/tests/common.test b/modules/simpletest/tests/common.test
index 76c4d4dfc..274dceb45 100644
--- a/modules/simpletest/tests/common.test
+++ b/modules/simpletest/tests/common.test
@@ -593,7 +593,7 @@ class CascadingStylesheetsTestCase extends DrupalWebTestCase {
$settings = array(
'type' => 'page',
'body' => array(
- FIELD_LANGUAGE_NONE => array(
+ LANGUAGE_NONE => array(
array(
'value' => t('This tests the inline CSS!') . "<?php drupal_add_css('$css', 'inline'); ?>",
// The "PHP code" format is always the most recent one added, since