Fix tests and bugs
modifié: core/lib/Thelia/Core/FileFormat/Formatting/AbstractFormatter.php modifié: core/lib/Thelia/Core/FileFormat/Formatting/FormatterData.php modifié: core/lib/Thelia/ImportExport/Export/Type/CustomerExport.php modifié: core/lib/Thelia/Tests/Controller/ImportControllerTest.php modifié: core/lib/Thelia/Tests/ImportExport/Export/CustomerExportTest.php
This commit is contained in:
@@ -31,7 +31,7 @@ abstract class AbstractFormatter implements FormatInterface, FormatterInterface
|
||||
protected $logger;
|
||||
|
||||
/** @var array */
|
||||
protected $order;
|
||||
protected $order = array();
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
@@ -54,7 +54,7 @@ abstract class AbstractFormatter implements FormatInterface, FormatterInterface
|
||||
|
||||
public function checkOrders(array $values)
|
||||
{
|
||||
foreach ($this->order as $order) {
|
||||
foreach ($this->getOrder() as $order) {
|
||||
if (!array_key_exists($order, $values)) {
|
||||
throw new \ErrorException(
|
||||
$this->translator->trans(
|
||||
|
||||
@@ -77,12 +77,6 @@ class FormatterData
|
||||
*/
|
||||
public function setData(array $data)
|
||||
{
|
||||
if (empty($this->aliases)) {
|
||||
$this->data = $data;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
$this->data = $this->applyAliases($data, $this->aliases);
|
||||
|
||||
return $this;
|
||||
|
||||
Reference in New Issue
Block a user