yiisoft / yii-core

Yii Framework 3.0 core
https://www.yiiframework.com/
433 stars 75 forks source link

Adjust to new DI and Reset response in mockWebApplication #153

Closed fcaldarelli closed 5 years ago

fcaldarelli commented 5 years ago

Reset response when mockWebApplication: this is needed doing HttpCache tests, such as this: https://github.com/yiisoft/yii-web/blob/70018261b5892c74a0638b0d7dc79fe2c5a05089/tests/filters/HttpCacheTest.php#L87 Otherwise, when this test is launched (after the previous), response object is already filled.

I thought to a "replaceAll" method of Container, but it could bring more problems than solutions.

samdark commented 5 years ago

Merged. Thank you!