diff --git a/framework/yii/base/HttpException.php b/framework/yii/base/HttpException.php index b1478b0..cce0bb0 100644 --- a/framework/yii/base/HttpException.php +++ b/framework/yii/base/HttpException.php @@ -7,8 +7,6 @@ namespace yii\base; -use yii\web\Response; - /** * HttpException represents an exception caused by an improper request of the end-user. @@ -45,8 +43,8 @@ class HttpException extends UserException */ public function getName() { - if (isset(Response::$statusTexts[$this->statusCode])) { - return Response::$statusTexts[$this->statusCode]; + if (isset(\yii\web\Response::$statusTexts[$this->statusCode])) { + return \yii\web\Response::$statusTexts[$this->statusCode]; } else { return 'Error'; } diff --git a/tests/unit/framework/web/ResponseTest.php b/tests/unit/framework/web/ResponseTest.php index 2fde63d..5da9b8c 100644 --- a/tests/unit/framework/web/ResponseTest.php +++ b/tests/unit/framework/web/ResponseTest.php @@ -32,6 +32,7 @@ class ResponseTest extends \yiiunit\TestCase protected function setUp() { parent::setUp(); + $this->mockApplication(); $this->reset(); }