Hi, i have the same issue with yii, netbeans7.2 and phpunit.
Hi, i have the same issue with yii, netbeans7.2 and phpunit.
I am also having the exactly same problem. Looking forward to seeing someone who can help!
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.
Same problem.
Netbeans 7.3
yii 1.1.13
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!
Hej guys.
Please Look here:
github dot com/yiisoft/yii/issues/1110:
Add this line to your bootstrap file:
require_once($yiit);
require_once( Yii::getPathOfAlias(‘system.test.CTestCase’).’.php’ );
require_once(dirname(FILE).’/WebTestCase.php’);
And in project properties under PHPUnit configuration make sure that "Use Bootstrap for Creating New Unit Tests" check box is thickened.
very helpful thankyou
In model Type add
require_once (’/../../../../yii/framework/yii.php’); //Path yii
Thanks for sharing, I will definitely look into this.