1. Create a web application project with yiic tools (e.g. yii-1.0.3.r780\framework>yiic webapp ../../testdrive2). Run the project to see that it works.
2. Create a netbeans php project from the source code obtained (File>New Project>Categories:PHP>Projects: PHP Application with Existing Sources). Run the project to see that it works.
3. Make sure that your Yii framework is added to your PHP Include Path
4. Create a directory for your tests at the same level of protected directory.
5. Copy, to your tests directory, these attached files TestApplication.php, TestWebApplication.php, yii.php.
6. As SiteController.php extends CController, add to SiteController.php this line:

require_once 'yii.php';

7. Right clic SiteController.php and select Tools>Create PHPunit tests.
8. Remove from SiteController.php this line added in Step 6 :