Wrapper classes required to run Yii functional tests with Codeception. Does not provide a smooth integration (yet). For now use for your own pain and risk.
Yii1 framework was not designed for functional testing. This bridge classes include components that override standart Yii components to be testable. The most common issues with Yii functional tests are usage headers
, cookies
functions in PHP code, which produce errors on testing. Also usage of exit
directive might even stop test execution completely.
- Install Codeception and set up Yii1 module.
- Clone this repository into
tests/_data
directory.
git clone [email protected]:Codeception/YiiBridge.git tests/_data/YiiBridge
- include
yiit.php
file in yourtests/_bootstrap.php
:
require_once __DIR__.'/../_data/YiiBridge/yiit.php';
- Done!
This bridge is far from complete. It might not suit your project as well. So any contributions are welcome. If you feel like you need to customize any of provided classes - please do that.
- Sessions -> triggers php error
- Forwards -> triggers php error
- Http Codes
- WebApplication->end -> triggers
exit
directive
Initial version created by Ragazzo.