summaryrefslogtreecommitdiff
path: root/modules/file/tests
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-10-11 03:07:21 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-10-11 03:07:21 +0000
commitb3265dbe174ce0efefa181b8af6c1eaea3ff22c2 (patch)
treeaa7e8b709c162fd781748d8bebaa12c75727e01e /modules/file/tests
parent64a1a0d67eb5aecc8e6d78469b19f58e8443c717 (diff)
downloadbrdo-b3265dbe174ce0efefa181b8af6c1eaea3ff22c2.tar.gz
brdo-b3265dbe174ce0efefa181b8af6c1eaea3ff22c2.tar.bz2
#557292 by peximo, plach, catch, and yched: Convert node title to Field API.
Diffstat (limited to 'modules/file/tests')
-rw-r--r--modules/file/tests/file.test8
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/file/tests/file.test b/modules/file/tests/file.test
index f37050795..2a39b8b19 100644
--- a/modules/file/tests/file.test
+++ b/modules/file/tests/file.test
@@ -87,8 +87,9 @@ class FileFieldTestCase extends DrupalWebTestCase {
* Upload a file to a node.
*/
function uploadNodeFile($file, $field_name, $nid_or_type, $new_revision = TRUE) {
+ $langcode = FIELD_LANGUAGE_NONE;
$edit = array(
- 'title' => $this->randomName(),
+ "title[$langcode][0][value]" => $this->randomName(),
'revision' => (string) (int) $new_revision,
);
@@ -344,7 +345,8 @@ class FileFieldValidateTestCase extends FileFieldTestCase {
$test_file = $this->getTestFile('text');
// Try to post a new node without uploading a file.
- $edit = array('title' => $this->randomName());
+ $langcode = FIELD_LANGUAGE_NONE;
+ $edit = array("title[$langcode][0][value]" => $this->randomName());
$this->drupalPost('node/add/' . $type_name, $edit, t('Save'));
$this->assertRaw(t('!title field is required.', array('!title' => $instance['label'])), t('Node save failed when required file field was empty.'));
@@ -361,7 +363,7 @@ class FileFieldValidateTestCase extends FileFieldTestCase {
$this->createFileField($field_name, $type_name, array('cardinality' => FIELD_CARDINALITY_UNLIMITED), array('required' => '1'));
// Try to post a new node without uploading a file in the multivalue field.
- $edit = array('title' => $this->randomName());
+ $edit = array("title[$langcode][0][value]" => $this->randomName());
$this->drupalPost('node/add/' . $type_name, $edit, t('Save'));
$this->assertRaw(t('!title field is required.', array('!title' => $instance['label'])), t('Node save failed when required multiple value file field was empty.'));