Yii Framework Forum: Netbeans (6.8), PHPunit and Yii - Yii Framework Forum

Jump to content

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Netbeans (6.8), PHPunit and Yii How to create PHPunit tests cases in Netbeans (6.8) for an Yii web app Rate Topic: ***** 7 Votes

#21 User is offline   tihanyilaci 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 29
  • Joined: 29-July 11

Posted 09 February 2013 - 09:27 AM

View PostCVP, on 07 February 2013 - 11:33 PM, said:

Unfortunately no - However i am using a newer version of Netbeans and PHP Unit. Maybe i should post a new thread about this.


Hi, i have the same issue with yii, netbeans7.2 and phpunit.
0

#22 User is offline   Yang He 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 8
  • Joined: 08-January 12

Posted 08 March 2013 - 09:11 AM

View PostCVP, on 07 February 2013 - 11:33 PM, said:

Unfortunately no - However i am using a newer version of Netbeans and PHP Unit. Maybe i should post a new thread about this.



I am also having the exactly same problem. Looking forward to seeing someone who can help!
0

#23 User is offline   mrk 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 33
  • Joined: 07-March 11

Posted 10 March 2013 - 02:41 PM

View PostYang He, on 08 March 2013 - 09:11 AM, said:

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.
0

#24 User is offline   magnolia 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 01-April 13

Posted 01 April 2013 - 10:43 AM

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!
0

#25 User is offline   BoogeyMan 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 09-April 13

Posted 13 April 2013 - 03:24 PM

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.
0

#26 User is offline   bomber 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 18-April 13

Posted 18 April 2013 - 03:17 AM

very helpful thankyou
0

#27 User is offline   Minds Winding 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 30-December 13

Posted 31 December 2013 - 05:54 PM

View PostCVP, on 07 February 2013 - 11:33 PM, said:

Unfortunately no - However i am using a newer version of Netbeans and PHP Unit. Maybe i should post a new thread about this.


In model Type add

require_once ('/../../../../yii/framework/yii.php'); //Path yii
0

#28 User is offline   BigBawss 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 26-March 13
  • Location:Utrecht, Netherlands

Posted 06 January 2014 - 05:58 PM

Thanks for sharing, I will definitely look into this.
Every night, I read the Yii Manual to fall asleep. Take it in a good way (because I like reading it?) or in a bad way (It's soo massive that I quickly get tired of it), up to you ;)
0

Share this topic:


  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users