|
|
@ -5,29 +5,16 @@ namespace yiiunit\framework\web; |
|
|
|
use Yii; |
|
|
|
use Yii; |
|
|
|
use yii\helpers\StringHelper; |
|
|
|
use yii\helpers\StringHelper; |
|
|
|
|
|
|
|
|
|
|
|
class MockResponse extends \yii\web\Response |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
public function send() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
// does nothing to allow testing |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @group web |
|
|
|
* @group web |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
class ResponseTest extends \yiiunit\TestCase |
|
|
|
class ResponseTest extends \yiiunit\TestCase |
|
|
|
{ |
|
|
|
{ |
|
|
|
/** |
|
|
|
|
|
|
|
* @var MockResponse |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public $response; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected function setUp() |
|
|
|
protected function setUp() |
|
|
|
{ |
|
|
|
{ |
|
|
|
parent::setUp(); |
|
|
|
parent::setUp(); |
|
|
|
$this->mockApplication(); |
|
|
|
$this->mockApplication(); |
|
|
|
$this->response = new MockResponse; |
|
|
|
$this->response = new \yii\web\Response; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function rightRanges() |
|
|
|
public function rightRanges() |
|
|
|