Fix export

modifié:         core/lib/Thelia/ImportExport/Export/ExportHandler.php
	modifié:         core/lib/Thelia/Tests/ImportExport/Export/CustomerExportTest.php
This commit is contained in:
Benjamin Perche
2014-07-28 15:02:53 +02:00
parent c461a5e92b
commit c208d8bb19
2 changed files with 5 additions and 4 deletions

View File

@@ -219,7 +219,10 @@ abstract class ExportHandler extends AbstractHandler
$path = $model->getUploadDir() . DS . $model->getFile();
if (is_file($path) && is_readable($path)) {
$paths[$model->getTitle() . DS . $model->getFile()] = $path;
$parent = $model->getParentFileModel();
$name = constant($parent::TABLE_MAP . "::TABLE_NAME");
$paths[$name . DS . $model->getFile()] = $path;
}
}

View File

@@ -183,10 +183,8 @@ class CustomerExportTest extends \PHPUnit_Framework_TestCase
sort($rowKeys);
$this->assertEquals($rowKeys, $keys);
++$i;
} while (
isset($rawData[$i]["ref"]) &&
isset($rawData[++$i]["ref"]) &&
$rawData[$i-1]["ref"] === $rawData[$i]["ref"] &&
++$max
);