mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-02 13:02:24 +08:00
Added runtime cleanup for Smarty and Twig tests
This commit is contained in:
@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
namespace yiiunit\extensions\smarty;
|
namespace yiiunit\extensions\smarty;
|
||||||
|
|
||||||
|
use yii\helpers\FileHelper;
|
||||||
use yii\web\AssetManager;
|
use yii\web\AssetManager;
|
||||||
use yii\web\View;
|
use yii\web\View;
|
||||||
use Yii;
|
use Yii;
|
||||||
@ -20,9 +21,17 @@ class ViewRendererTest extends TestCase
|
|||||||
{
|
{
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
|
parent::setUp();
|
||||||
$this->mockApplication();
|
$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
|
* https://github.com/yiisoft/yii2/issues/2265
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace yiiunit\extensions\twig;
|
namespace yiiunit\extensions\twig;
|
||||||
|
|
||||||
|
use yii\helpers\FileHelper;
|
||||||
use yii\web\AssetManager;
|
use yii\web\AssetManager;
|
||||||
use yii\web\View;
|
use yii\web\View;
|
||||||
use Yii;
|
use Yii;
|
||||||
@ -24,6 +25,12 @@ class ViewRendererTest extends DatabaseTestCase
|
|||||||
$this->mockApplication();
|
$this->mockApplication();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function tearDown()
|
||||||
|
{
|
||||||
|
parent::tearDown();
|
||||||
|
FileHelper::removeDirectory(Yii::getAlias('@runtime/assets'));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* https://github.com/yiisoft/yii2/issues/1755
|
* https://github.com/yiisoft/yii2/issues/1755
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user