Hi, i have the same issue with yii, netbeans7.2 and phpunit.
Netbeans (6.8), PHPunit and Yii How to create PHPunit tests cases in Netbeans (6.8) for an Yii web app
Posted 08 March 2013 - 09:11 AM
Posted 10 March 2013 - 02:41 PM
I think the problem in this case is wrongly specified bootstrap file. Skeleton generation need to know paths and other stuff to be able to read classes.
I guess you have this file, because otherwise you would get RuntimeException that skeleton generator was not able to found it, but probably it's not setting necessary things - either setting include_paths or explicitely including files like yiilite which contains all those necessary classes.
Posted 01 April 2013 - 10:43 AM
PHP Fatal error: Class 'CActiveRecord' not found in /var/www/demo-yii/protected/models/Customer.php on line 14 PHPUnit Skeleton Generator 1.2.0 by Sebastian Bergmann.
My bootstrap.php file contains:
<?php // change the following paths if necessary $yiit=dirname(__FILE__).'/../../../yii-1.1.13/framework/yiit.php'; $config=dirname(__FILE__).'/../config/test.php'; require_once($yiit); require_once(dirname(__FILE__).'/WebTestCase.php'); Yii::createWebApplication($config);
What is wrong? Any help will be welcome!
Posted 13 April 2013 - 03:24 PM
Please Look here:
github dot com/yiisoft/yii/issues/1110:
Add this line to your bootstrap file:
require_once( Yii::getPathOfAlias('system.test.CTestCase').'.php' );
And in project properties under PHPUnit configuration make sure that "Use Bootstrap for Creating New Unit Tests" check box is thickened.
Posted 31 December 2013 - 05:54 PM
Posted 06 January 2014 - 05:58 PM