Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
b3c6d70c
Commit
b3c6d70c
authored
Jan 06, 2015
by
Klimov Paul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unit test for `yii\console\controllers\AssetController` advanced
parent
9b9b361a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
AssetControllerTest.php
...nit/framework/console/controllers/AssetControllerTest.php
+9
-1
No files found.
tests/unit/framework/console/controllers/AssetControllerTest.php
View file @
b3c6d70c
...
...
@@ -285,7 +285,15 @@ EOL;
// Then :
$this
->
assertTrue
(
file_exists
(
$bundleFile
),
'Unable to create output bundle file!'
);
$this
->
assertTrue
(
is_array
(
require
(
$bundleFile
)),
'Output bundle file has incorrect format!'
);
$compressedBundleConfig
=
require
(
$bundleFile
);
$this
->
assertTrue
(
is_array
(
$compressedBundleConfig
),
'Output bundle file has incorrect format!'
);
$this
->
assertCount
(
2
,
$compressedBundleConfig
,
'Output bundle config contains wrong bundle count!'
);
$this
->
assertArrayHasKey
(
$assetBundleClassName
,
$compressedBundleConfig
,
'Source bundle is lost!'
);
$compressedAssetBundleConfig
=
$compressedBundleConfig
[
$assetBundleClassName
];
$this
->
assertEmpty
(
$compressedAssetBundleConfig
[
'css'
],
'Compressed bundle css is not empty!'
);
$this
->
assertEmpty
(
$compressedAssetBundleConfig
[
'js'
],
'Compressed bundle js is not empty!'
);
$this
->
assertNotEmpty
(
$compressedAssetBundleConfig
[
'depends'
],
'Compressed bundle dependency is invalid!'
);
$compressedCssFileName
=
$this
->
testAssetsBasePath
.
DIRECTORY_SEPARATOR
.
'all.css'
;
$this
->
assertTrue
(
file_exists
(
$compressedCssFileName
),
'Unable to compress CSS files!'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment