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
d9dd7292
Commit
d9dd7292
authored
Jan 08, 2014
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed test break.
parent
eb779ff6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
15 deletions
+2
-15
ResponseTest.php
tests/unit/framework/web/ResponseTest.php
+2
-15
No files found.
tests/unit/framework/web/ResponseTest.php
View file @
d9dd7292
...
...
@@ -5,29 +5,16 @@ namespace yiiunit\framework\web;
use
Yii
;
use
yii\helpers\StringHelper
;
class
MockResponse
extends
\yii\web\Response
{
public
function
send
()
{
// does nothing to allow testing
}
}
/**
* @group web
*/
class
ResponseTest
extends
\yiiunit\TestCase
{
/**
* @var MockResponse
*/
public
$response
;
protected
function
setUp
()
{
parent
::
setUp
();
$this
->
mockApplication
();
$this
->
response
=
new
Mock
Response
;
$this
->
response
=
new
\yii\web\
Response
;
}
public
function
rightRanges
()
...
...
@@ -50,7 +37,7 @@ class ResponseTest extends \yiiunit\TestCase
$fullContent
=
file_get_contents
(
$dataFile
);
$_SERVER
[
'HTTP_RANGE'
]
=
'bytes='
.
$rangeHeader
;
ob_start
();
$this
->
response
->
sendFile
(
$dataFile
)
->
send
();
$this
->
response
->
sendFile
(
$dataFile
)
->
send
(
);
$content
=
ob_get_clean
();
$this
->
assertEquals
(
$expectedContent
,
$content
);
...
...
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