mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-01 20:19:42 +08:00
Added runtime cleanup for Smarty and Twig tests
This commit is contained in:
@ -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
|
||||
*/
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user