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:
Benjamin Perche
2014-07-25 08:50:16 +02:00
parent f73703c578
commit 7adc31514e
5 changed files with 32 additions and 27 deletions

View File

@@ -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(

View File

@@ -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;