Commit b455f2c9 by Qiang Xue

Fixed test break.

parent ba0da059
...@@ -7,8 +7,6 @@ ...@@ -7,8 +7,6 @@
namespace yii\base; namespace yii\base;
use yii\web\Response;
/** /**
* HttpException represents an exception caused by an improper request of the end-user. * HttpException represents an exception caused by an improper request of the end-user.
...@@ -45,8 +43,8 @@ class HttpException extends UserException ...@@ -45,8 +43,8 @@ class HttpException extends UserException
*/ */
public function getName() public function getName()
{ {
if (isset(Response::$statusTexts[$this->statusCode])) { if (isset(\yii\web\Response::$statusTexts[$this->statusCode])) {
return Response::$statusTexts[$this->statusCode]; return \yii\web\Response::$statusTexts[$this->statusCode];
} else { } else {
return 'Error'; return 'Error';
} }
......
...@@ -32,6 +32,7 @@ class ResponseTest extends \yiiunit\TestCase ...@@ -32,6 +32,7 @@ class ResponseTest extends \yiiunit\TestCase
protected function setUp() protected function setUp()
{ {
parent::setUp(); parent::setUp();
$this->mockApplication();
$this->reset(); $this->reset();
} }
......
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