Yii Framework Forum: Unit tests didn't work - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Unit tests didn't work Rate Topic: -----

#1 User is offline   SRIT 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 11
  • Joined: 28-November 09

Posted 13 February 2010 - 10:21 AM

Hy,

if I execute at example:
phpunit --verbose functional
the console will output the following error:
PHPUnit 3.2.16 by Sebastian Bergmann.

File "functional.php" could not be found or is not readable.


But the top example is from the documentation, is the a trick to execute the tests. Before you answer change the working dir to $YIIAPP/protected/tests this have I do. ;)

BR
0

#2 User is offline   tri 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,651
  • Joined: 20-November 08
  • Location:Stockholm, Sweden

Posted 13 February 2010 - 10:49 AM

View PostSRIT, on 13 February 2010 - 10:21 AM, said:

Hy,

if I execute at example:
phpunit --verbose functional
the console will output the following error:
PHPUnit 3.2.16 by Sebastian Bergmann.

File "functional.php" could not be found or is not readable.


But the top example is from the documentation, is the a trick to execute the tests. Before you answer change the working dir to $YIIAPP/protected/tests this have I do. ;)

BR


Works for me with PHPUnit 3.4.0

Edit: BTW did you mean functional tests? The subject line says unit tests. I see a DB problem not noticed before with unit tests ( http://www.yiiframew...db-connnection/ ).

Edit2: "The testing supported provided by Yii requires PHPUnit 3.3+ and Selenium Remote Control 1.0+." Reference: the guide

/Tommy

This post has been edited by tri: 13 February 2010 - 12:56 PM

Don't forget to read The Definitive Guide to Yii (en) (sv) | The class reference has the details
0

#3 User is offline   SRIT 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 11
  • Joined: 28-November 09

Posted 15 February 2010 - 06:52 AM

View Posttri, on 13 February 2010 - 10:49 AM, said:

Works for me with PHPUnit 3.4.0

Edit: BTW did you mean functional tests? The subject line says unit tests. I see a DB problem not noticed before with unit tests ( http://www.yiiframew...db-connnection/ ).

Edit2: "The testing supported provided by Yii requires PHPUnit 3.3+ and Selenium Remote Control 1.0+." Reference: the guide

/Tommy


Yes yii tests works fine with phpunit 3.4! ;)
0

Share this topic:


Page 1 of 1
  • 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