diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 9b8a1bb8cb1..16965e138cf 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -23,5 +23,10 @@ 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 570abcbd1b4..3a11c6699b6 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 5612c837b54..60a2c237257 100644 --- a/tests/framework/grid/CheckboxColumnTest.php +++ b/tests/framework/grid/CheckboxColumnTest.php @@ -27,8 +27,8 @@ protected function setUp() $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()