Define Import controller test
modifié: core/lib/Thelia/Tests/Controller/ControllerTestBase.php nouveau fichier: core/lib/Thelia/Tests/Controller/ImportControllerTest.php modifié: core/lib/Thelia/Tests/Controller/ImportExportControllerTest.php
This commit is contained in:
@@ -81,11 +81,11 @@ abstract class ControllerTestBase extends \PHPUnit_Framework_TestCase
|
||||
/**
|
||||
* @return \Thelia\Controller\BaseController The controller you want to test
|
||||
*/
|
||||
abstract function getController();
|
||||
abstract protected function getController();
|
||||
|
||||
/**
|
||||
* Use this method to build the container with the services that you need.
|
||||
*/
|
||||
abstract function buildContainer(ContainerBuilder $container);
|
||||
abstract protected function buildContainer(ContainerBuilder $container);
|
||||
|
||||
}
|
||||
32
core/lib/Thelia/Tests/Controller/ImportControllerTest.php
Normal file
32
core/lib/Thelia/Tests/Controller/ImportControllerTest.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Tests\Controller;
|
||||
use Thelia\Controller\Admin\ImportController;
|
||||
|
||||
/**
|
||||
* Class ImportControllerTest
|
||||
* @package Thelia\Tests\Controller
|
||||
* @author Benjamin Perche <bperche@openstudio.fr>
|
||||
*/
|
||||
class ImportControllerTest extends ImportExportControllerTest
|
||||
{
|
||||
/**
|
||||
* @return \Thelia\Controller\BaseController The controller you want to test
|
||||
*/
|
||||
protected function getController()
|
||||
{
|
||||
return new ImportController();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -12,7 +12,6 @@
|
||||
|
||||
namespace Thelia\Tests\Controller;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Thelia\Controller\Admin\ImportController;
|
||||
use Thelia\Core\FileFormat\Archive\ArchiveBuilder\TarArchiveBuilder;
|
||||
use Thelia\Core\FileFormat\Archive\ArchiveBuilder\TarBz2ArchiveBuilder;
|
||||
use Thelia\Core\FileFormat\Archive\ArchiveBuilder\TarGzArchiveBuilder;
|
||||
@@ -28,13 +27,13 @@ use Thelia\Core\FileFormat\Formatting\FormatterManager;
|
||||
* @package Thelia\Tests\Controller
|
||||
* @author Benjamin Perche <bperche@openstudio.fr>
|
||||
*/
|
||||
abstract class ControllerExportControllerTest extends ControllerTestBase
|
||||
abstract class ImportExportControllerTest extends ControllerTestBase
|
||||
{
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
function buildContainer(ContainerBuilder $container)
|
||||
protected function buildContainer(ContainerBuilder $container)
|
||||
{
|
||||
$archiveBuilderManager = (new ArchiveBuilderManager("dev"))
|
||||
->add(new ZipArchiveBuilder())
|
||||
|
||||
Reference in New Issue
Block a user