Refactor ImportExportControllerBase into a trait and finish ProductStockImportTest
modifié: core/lib/Thelia/Tests/Controller/ImportControllerTest.php renommé: core/lib/Thelia/Tests/Controller/ImportExportControllerTest.php -> core/lib/Thelia/Tests/Controller/ImportExportControllerTrait.php modifié: core/lib/Thelia/Tests/ImportExport/Import/ProductStockImportTest.php
This commit is contained in:
@@ -19,14 +19,15 @@ use Thelia\Core\FileFormat\Formatting\FormatterManagerTrait;
|
||||
use Thelia\Core\FileFormat\FormatType;
|
||||
|
||||
/**
|
||||
* Class ImportControllerTest
|
||||
* Class ImportControllerTrait
|
||||
* @package Thelia\Tests\Controller
|
||||
* @author Benjamin Perche <bperche@openstudio.fr>
|
||||
*/
|
||||
class ImportControllerTest extends ImportExportControllerTest
|
||||
class ImportControllerTrait extends ControllerTestBase
|
||||
{
|
||||
use FormatterManagerTrait;
|
||||
use ArchiveBuilderManagerTrait;
|
||||
use ImportExportControllerTrait;
|
||||
|
||||
/**
|
||||
* @return \Thelia\Controller\BaseController The controller you want to test
|
||||
|
||||
@@ -27,7 +27,7 @@ use Thelia\Core\FileFormat\Formatting\FormatterManager;
|
||||
* @package Thelia\Tests\Controller
|
||||
* @author Benjamin Perche <bperche@openstudio.fr>
|
||||
*/
|
||||
abstract class ImportExportControllerTest extends ControllerTestBase
|
||||
trait ImportExportControllerTrait
|
||||
{
|
||||
|
||||
/**
|
||||
@@ -11,10 +11,12 @@
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Tests\ImportExport\Import;
|
||||
use Thelia\Controller\Admin\ImportController;
|
||||
use Thelia\Core\FileFormat\Formatting\Formatter\JsonFormatter;
|
||||
use Thelia\ImportExport\Import\Type\ProductStockImport;
|
||||
use Thelia\Model\ProductSaleElementsQuery;
|
||||
use Thelia\Tests\Controller\ControllerTestBase;
|
||||
use Thelia\Tests\Controller\ImportExportControllerTrait;
|
||||
|
||||
/**
|
||||
* Class ProductStockControllerTest
|
||||
@@ -23,6 +25,17 @@ use Thelia\Tests\Controller\ControllerTestBase;
|
||||
*/
|
||||
class ProductStockControllerTest extends ControllerTestBase
|
||||
{
|
||||
use ImportExportControllerTrait;
|
||||
|
||||
/**
|
||||
* @return \Thelia\Controller\BaseController The controller you want to test
|
||||
*/
|
||||
protected function getController()
|
||||
{
|
||||
return new ImportController();
|
||||
}
|
||||
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
Reference in New Issue
Block a user