diff --git a/core/lib/Thelia/Tests/Controller/ImportControllerTest.php b/core/lib/Thelia/Tests/Controller/ImportControllerTest.php index ff1867d0d..ff645b6a2 100644 --- a/core/lib/Thelia/Tests/Controller/ImportControllerTest.php +++ b/core/lib/Thelia/Tests/Controller/ImportControllerTest.php @@ -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 */ -class ImportControllerTest extends ImportExportControllerTest +class ImportControllerTrait extends ControllerTestBase { use FormatterManagerTrait; use ArchiveBuilderManagerTrait; + use ImportExportControllerTrait; /** * @return \Thelia\Controller\BaseController The controller you want to test diff --git a/core/lib/Thelia/Tests/Controller/ImportExportControllerTest.php b/core/lib/Thelia/Tests/Controller/ImportExportControllerTrait.php similarity index 97% rename from core/lib/Thelia/Tests/Controller/ImportExportControllerTest.php rename to core/lib/Thelia/Tests/Controller/ImportExportControllerTrait.php index da126fca7..edd8294bd 100644 --- a/core/lib/Thelia/Tests/Controller/ImportExportControllerTest.php +++ b/core/lib/Thelia/Tests/Controller/ImportExportControllerTrait.php @@ -27,7 +27,7 @@ use Thelia\Core\FileFormat\Formatting\FormatterManager; * @package Thelia\Tests\Controller * @author Benjamin Perche */ -abstract class ImportExportControllerTest extends ControllerTestBase +trait ImportExportControllerTrait { /** diff --git a/core/lib/Thelia/Tests/ImportExport/Import/ProductStockImportTest.php b/core/lib/Thelia/Tests/ImportExport/Import/ProductStockImportTest.php index 6ce75c9d6..bffb2a640 100644 --- a/core/lib/Thelia/Tests/ImportExport/Import/ProductStockImportTest.php +++ b/core/lib/Thelia/Tests/ImportExport/Import/ProductStockImportTest.php @@ -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();