Commit 8d17fccc by Klimov Paul

Error "yii\console\controllers\AssetController::combineCssFiles()" has been fixed.

parent 0ecdcae5
...@@ -96,8 +96,10 @@ class AssetControllerTest extends TestCase ...@@ -96,8 +96,10 @@ class AssetControllerTest extends TestCase
'all' => array( 'all' => array(
'basePath' => $assetsBasePath, 'basePath' => $assetsBasePath,
'baseUrl' => $baseUrl, 'baseUrl' => $baseUrl,
'js' => 'all-{ts}.js', 'js' => 'all.js',
'css' => 'all-{ts}.css', //'js' => 'all-{ts}.js',
'css' => 'all.css',
//'css' => 'all-{ts}.css',
), ),
), ),
'assetManager' => array( 'assetManager' => array(
...@@ -201,6 +203,10 @@ class AssetControllerTest extends TestCase ...@@ -201,6 +203,10 @@ class AssetControllerTest extends TestCase
$this->runAssetControllerAction('compress', array($configFile, $bundleFile)); $this->runAssetControllerAction('compress', array($configFile, $bundleFile));
$this->markTestIncomplete(); $assetsBasePath = $this->testFilePath.DIRECTORY_SEPARATOR.'assets';
$compressedCssFileName = $assetsBasePath.DIRECTORY_SEPARATOR.'all.css';
$this->assertTrue(file_exists($compressedCssFileName), 'Unable to compress CSS files!');
$compressedJsFileName = $assetsBasePath.DIRECTORY_SEPARATOR.'all.js';
$this->assertTrue(file_exists($compressedJsFileName), 'Unable to compress JS files!');
} }
} }
...@@ -291,9 +291,10 @@ EOD ...@@ -291,9 +291,10 @@ EOD
$tmpFile = $outputFile . '.tmp'; $tmpFile = $outputFile . '.tmp';
$this->combineCssFiles($inputFiles, $tmpFile); $this->combineCssFiles($inputFiles, $tmpFile);
$log = shell_exec(strtr($this->cssCompressor, array( $log = shell_exec(strtr($this->cssCompressor, array(
'{from}' => $inputFiles, '{from}' => $tmpFile,
'{to}' => $outputFile, '{to}' => $outputFile,
))); )));
@unlink($tmpFile);
} else { } else {
$log = call_user_func($this->cssCompressor, $this, $inputFiles, $outputFile); $log = call_user_func($this->cssCompressor, $this, $inputFiles, $outputFile);
} }
......
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