Clear Smarty compiled templates before controller tests

In order to avoid permission errors
This commit is contained in:
Pierre Rudloff 2020-12-17 22:30:19 +01:00
parent 9921b6210f
commit f2785bca03
1 changed files with 7 additions and 0 deletions

View File

@ -13,6 +13,7 @@ use Alltube\Controller\FrontController;
use Alltube\Exception\ConfigException;
use Alltube\Exception\DependencyException;
use Slim\Http\Response;
use Slim\Views\Smarty;
use SmartyException;
/**
@ -52,6 +53,12 @@ abstract class ControllerTest extends ContainerTest
->setName('locale');
$router->map(['GET'], '/redirect', [$downloadController, 'download'])
->setName('download');
/** @var Smarty $view */
$view = $this->container->get('view');
// Make sure we start the tests without compiled templates.
$view->getSmarty()->clearCompiledTemplate();
}
/**