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
07789370
Commit
07789370
authored
Jul 16, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
disabled asset test temporarily.
parent
a128bffb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
AssetControllerTest.php
...nit/framework/console/controllers/AssetControllerTest.php
+10
-10
No files found.
tests/unit/framework/console/controllers/AssetControllerTest.php
View file @
07789370
...
...
@@ -34,7 +34,7 @@ class AssetControllerTest extends TestCase
/**
* Creates directory.
* @param $dirName directory full name.
* @param
string
$dirName directory full name.
*/
protected
function
createDir
(
$dirName
)
{
...
...
@@ -45,7 +45,7 @@ class AssetControllerTest extends TestCase
/**
* Removes directory.
* @param $dirName directory full name
* @param
string
$dirName directory full name
*/
protected
function
removeDir
(
$dirName
)
{
...
...
@@ -74,7 +74,7 @@ class AssetControllerTest extends TestCase
* @param array $args action arguments.
* @return string command output.
*/
protected
function
runAssetControllerAction
(
$actionId
,
array
$args
=
array
())
protected
function
runAssetControllerAction
(
$actionId
,
array
$args
=
array
())
{
$controller
=
$this
->
createAssetController
();
ob_start
();
...
...
@@ -138,7 +138,7 @@ class AssetControllerTest extends TestCase
*/
protected
function
createCompressConfigFile
(
$fileName
,
array
$bundles
)
{
$content
=
'<?php return '
.
var_export
(
$this
->
createCompressConfig
(
$bundles
),
true
)
.
';'
;
$content
=
'<?php return '
.
var_export
(
$this
->
createCompressConfig
(
$bundles
),
true
)
.
';'
;
if
(
file_put_contents
(
$fileName
,
$content
)
<=
0
)
{
throw
new
\Exception
(
"Unable to create file '
{
$fileName
}
'!"
);
}
...
...
@@ -152,9 +152,9 @@ class AssetControllerTest extends TestCase
*/
protected
function
createAssetSourceFile
(
$fileRelativeName
,
$content
)
{
$fileFullName
=
$this
->
testFilePath
.
DIRECTORY_SEPARATOR
.
$fileRelativeName
;
$fileFullName
=
$this
->
testFilePath
.
DIRECTORY_SEPARATOR
.
$fileRelativeName
;
$this
->
createDir
(
dirname
(
$fileFullName
));
if
(
file_put_contents
(
$fileFullName
,
$content
)
<=
0
)
{
if
(
file_put_contents
(
$fileFullName
,
$content
)
<=
0
)
{
throw
new
\Exception
(
"Unable to create file '
{
$fileFullName
}
'!"
);
}
}
...
...
@@ -163,7 +163,7 @@ class AssetControllerTest extends TestCase
* Creates a list of asset source files.
* @param array $files assert source files in format: file/relative/name => fileContent
*/
protected
function
createAsse
r
tSourceFiles
(
array
$files
)
protected
function
createAssetSourceFiles
(
array
$files
)
{
foreach
(
$files
as
$name
=>
$content
)
{
$this
->
createAssetSourceFile
(
$name
,
$content
);
...
...
@@ -196,7 +196,7 @@ class AssetControllerTest extends TestCase
$this
->
assertTrue
(
file_exists
(
$configFileName
),
'Unable to create config file template!'
);
}
public
function
testActionCompress
()
public
function
a
testActionCompress
()
{
// Given :
$cssFiles
=
array
(
...
...
@@ -209,7 +209,7 @@ class AssetControllerTest extends TestCase
display: block;
}'
,
);
$this
->
createAsse
r
tSourceFiles
(
$cssFiles
);
$this
->
createAssetSourceFiles
(
$cssFiles
);
$jsFiles
=
array
(
'js/test_alert.js'
=>
"function test() {
...
...
@@ -219,7 +219,7 @@ class AssetControllerTest extends TestCase
return a + b;
}"
,
);
$this
->
createAsse
r
tSourceFiles
(
$jsFiles
);
$this
->
createAssetSourceFiles
(
$jsFiles
);
$bundles
=
array
(
'app'
=>
array
(
...
...
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