The following code is working fine for uploading images. The node is being created but the uploaded images (under /sites/default/files/simpletest) are getting deleted after each complete test suite run.

Here the sample code

    public function testBundleCreate() {
      $edit = array();
      $edit['title'] = $this->randomName(8);
      $edit["field_description[und][0][value]"] = $this->randomName(16);
      $field_name = 'my_image';
      $edit['files[' . $field_name . '_' . LANGUAGE_NONE . '_0]'] = 'sites/default/files/test-image.png'; // existed
      $this->drupalPost('node/add/quests', $edit, t('Save'));
      $this->drupalGet("node/1/edit");
      }

Screenshot
Verbose Screen

Getting 404 not found for the image path (sites/default/files/simpletest/505284/test-image.png)

Any suggestions?

CommentFileSizeAuthor
BGCEo.png7.26 KBkrishnamohan_ramadugula

Comments

drupal_android created an issue. See original summary.

krishnamohan_ramadugula’s picture

Version: 7.x-2.x-dev » 7.x-2.0
krishnamohan_ramadugula’s picture