Active
Project:
SimpleTest
Version:
7.x-2.0
Component:
Code
Priority:
Critical
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
21 Aug 2017 at 19:02 UTC
Updated:
22 Oct 2024 at 17:07 UTC
Jump to comment: Most recent
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

Getting 404 not found for the image path (sites/default/files/simpletest/505284/test-image.png)
Any suggestions?
| Comment | File | Size | Author |
|---|---|---|---|
| BGCEo.png | 7.26 KB | krishnamohan_ramadugula |
Comments
Comment #2
krishnamohan_ramadugulaComment #3
krishnamohan_ramadugula