Commit 892d95a3 by Alexander Makarov

Added runtime cleanup for Smarty and Twig tests

parent 3139c979
......@@ -7,6 +7,7 @@
namespace yiiunit\extensions\smarty;
use yii\helpers\FileHelper;
use yii\web\AssetManager;
use yii\web\View;
use Yii;
......@@ -20,9 +21,17 @@ class ViewRendererTest extends TestCase
{
protected function setUp()
{
parent::setUp();
$this->mockApplication();
}
protected function tearDown()
{
parent::tearDown();
FileHelper::removeDirectory(Yii::getAlias('@runtime/assets'));
FileHelper::removeDirectory(Yii::getAlias('@runtime/Smarty'));
}
/**
* https://github.com/yiisoft/yii2/issues/2265
*/
......
<?php
namespace yiiunit\extensions\twig;
use yii\helpers\FileHelper;
use yii\web\AssetManager;
use yii\web\View;
use Yii;
......@@ -24,6 +25,12 @@ class ViewRendererTest extends DatabaseTestCase
$this->mockApplication();
}
protected function tearDown()
{
parent::tearDown();
FileHelper::removeDirectory(Yii::getAlias('@runtime/assets'));
}
/**
* https://github.com/yiisoft/yii2/issues/1755
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment