diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 9b8a1bb..16965e1 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -23,5 +23,10 @@ require_once __DIR__ . '/../framework/Yii.php'; Yii::setAlias('@yiiunit', __DIR__); +if (getenv('TEST_RUNTIME_PATH')) { + Yii::setAlias('@yiiunit/runtime', getenv('TEST_RUNTIME_PATH')); + Yii::setAlias('@runtime', getenv('TEST_RUNTIME_PATH')); +} + require_once __DIR__ . '/compatibility.php'; require_once __DIR__ . '/TestCase.php'; diff --git a/tests/docker-compose.yml b/tests/docker-compose.yml index 570abcb..3a11c66 100644 --- a/tests/docker-compose.yml +++ b/tests/docker-compose.yml @@ -12,6 +12,8 @@ services: # Tmpfs volume (experimental, asset tests may fail) #tmpfs: # - /project/tests/runtime + environment: + - TEST_RUNTIME_PATH=/tmp/runtime networks: default: diff --git a/tests/framework/grid/CheckboxColumnTest.php b/tests/framework/grid/CheckboxColumnTest.php index 5612c83..60a2c23 100644 --- a/tests/framework/grid/CheckboxColumnTest.php +++ b/tests/framework/grid/CheckboxColumnTest.php @@ -27,8 +27,8 @@ class CheckboxColumnTest extends TestCase $this->mockApplication(); Yii::setAlias('@webroot', '@yiiunit/runtime'); Yii::setAlias('@web', 'http://localhost/'); - Yii::$app->assetManager->bundles['yii\web\JqueryAsset'] = false; FileHelper::createDirectory(Yii::getAlias('@webroot/assets')); + Yii::$app->assetManager->bundles['yii\web\JqueryAsset'] = false; } public function testInputName()