If you are after convenient automated testing in a browser, you may be interested in SeLite. It extends Selenium IDE. It allows your tests to access (read and write to) a test DB (isolated from the DB of the tested application).
SeLite is especially good for Yii, which can have its data in (separate) SQLite DB. So if your test environment uses SQLite, your test data lifecycle will be very easy. However, you can benefit from SeLite even if your test Yii application uses other type of DB.