I need some idea, to create unit test for the action 'beforeControllerAction', which is extended from yii framework.
相关问题
- Yii - Eliminate default controller ID for a module
- selenium driver, option inside optgroup fails to e
- how to change csrf field id from YII_CSRF_TOKEN to
- Load balancing with Yii sessions
- Yii uploading pictures
相关文章
- Can you run console jobs from yii2-basic?
- How to do a bulk database insert in Yii2?
- Yii2 - check if the user is logged in view
- Is there a way to tell whether there are failures
- HowTo PHPUnit assertFunction
- Call static method from a string name in PHP
- radioButtonList checked by default
- Postgres error: null value in column “id” - during
beforeControllerAction
is parent method from any 'mycontroller' app controller, coming from framework core. You don't need to test specific core framework code (is already tested). You need to test your own code.One way to test your controller is to extend/inherit your own 'mycontroller' controller first and build a test for it. Taken from this excellent article: