9 use Magento\Mtf\Fixture\DataSource;
35 if (isset(
$data[
'images']) && is_array(
$data[
'images']) && count(
$data[
'images'])) {
36 foreach (
$data[
'images'] as $media) {
37 if (isset($media[
'file'])) {
54 if (!file_exists($filename)) {
56 $image = imageCreate(300, 200);
60 $colorYellow = imageColorAllocate(
$image, 255, 255, 0);
63 imageFilledRectangle(
$image, 50, 50, 250, 150, $colorYellow);
65 $directory = dirname($filename);
66 if (!file_exists($directory)) {
67 mkdir($directory, 0777,
true);
69 imageJpeg(
$image, $filename);
84 return BP . $this->mediaPathTmp . $filename;
mkdir($pathname, $mode=0777, $recursive=false, $context=null)
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]