diff --git a/tests/unit/e_formTest.php b/tests/unit/e_formTest.php
index 3ebbe99c5..579ef0b5d 100644
--- a/tests/unit/e_formTest.php
+++ b/tests/unit/e_formTest.php
@@ -64,6 +64,9 @@
'layout_002' => array ( 'title' => 'Layouts 002', 'type' => 'layouts', 'inline' => true, 'writeParms'=>array('plugin'=>'news', 'id'=>'news_view', 'area'=> 'front', 'merge'=>false)), // 'news', 'news_view', 'front'
// 'layout_003' => array ( 'title' => 'Layouts 003', 'type' => 'layouts', 'inline' => true, 'writeParms'=>array('plugin'=>'news', 'id'=>'news_view', 'area'=> 'front', 'merge'=>false)), // 'news', 'news_view', 'front'
+ 'image_001' => array('title'=>"Image 001", 'type' => 'image', 'data' => 'str', 'width' => '100px', 'thclass' => 'center', 'class'=>'center', 'readParms'=>'thumb=60&thumb_urlraw=0&thumb_aw=60&legacyPath={e_FILE}downloadimages', 'readonly'=>TRUE, 'batch' => FALSE, 'filter'=>FALSE),
+ 'image_002' => array('title'=>"Image 001", 'type' => 'image', 'data' => 'str', 'width' => '100px', 'thclass' => 'center', 'class'=>'center', 'readParms'=>'thumb=60&thumb_urlraw=0&thumb_aw=60&legacyPath={e_FILE}downloadimages', 'readonly'=>TRUE, 'batch' => FALSE, 'filter'=>FALSE),
+
);
// simulated database/form values.
@@ -81,7 +84,10 @@
'textarea_001' => "the quick brown fox jumps over the lazy dog",
'layout_001' => 'default',
- 'layout_002' => 'default'
+ 'layout_002' => 'default',
+
+ 'image_001' => '{e_THEME}bootstrap3/images/e107_adminlogo.png',
+ 'image_002' => 'butterfly.jpg',
);
@@ -99,6 +105,25 @@
{
$this->assertTrue(false, "Couldn't load e_form object");
}
+
+ $legacyDir = APP_PATH."/e107_files/downloadimages/";
+ $legacyFile = APP_PATH."/e107_files/downloadimages/butterfly.jpg";
+
+ if(!is_dir($legacyDir))
+ {
+ mkdir($legacyDir, 0775, true);
+ }
+
+ if(!file_exists($legacyFile))
+ {
+ copy(APP_PATH."/e107_plugins/gallery/images/butterfly.jpg", $legacyFile);
+ }
+
+ if(!file_exists($legacyFile))
+ {
+ $this->assertTrue(false,"Couldn't copy legacy image 'butterfly.jpg' to e107_files folder");
+ }
+
}
protected function _after()
@@ -647,13 +672,14 @@
'textarea_001' => "the quick brown fox jumps over the lazy dog",
'layout_001' => 'default',
- 'layout_002' => "Default"
+ 'layout_002' => "Default",
+ 'image_001' => "
",
+ 'image_002' => "
",
);
-
foreach($this->_fields as $field=>$att)
{
$value = $this->_values[$field];
@@ -693,7 +719,11 @@
'textarea_001' => "",
'layout_001' => "",
- 'layout_002' => ""
+ 'layout_002' => "",
+
+ 'image_001' => "
",
+ 'image_002' => "
",
+
);