phpunit yiibase.php


I have made a standard webapp using Yiic.

When i want to do a phpunit test, i go to protected/tests. Than run this: phpunit unit.DBTest.php

When phpunit is ready i get to following:

PHPUnit 3.6.3 by Sebastian Bergmann.

Configuration read from C:\webroot\\protected\tests\phpunit.xml

.PHP Warning: include(PHPUnit_Extensions_Database_TestCase.php): failed to open

stream: No such file or directory in C:\webroot\framework.yii-1.1.8\YiiBase.php

on line 421

PHP Warning: include(): Failed opening '

p’ for inclusion (include_path=’.;C:\webroot\\protected\componen

ts;C:\webroot\\protected\models;C:\Program Files\BitNami WAPPSta

ck\php\PEAR\pear;C:\Program Files\BitNami WAPPStack\php\pear’) in C:\webroot\fra

mework.yii-1.1.8\YiiBase.php on line 421

Time: 1 second, Memory: 4.75Mb

OK (1 test, 1 assertion)

Can someone helps me what is wrong?

I’m having the same problem in Ubuntu. Running Xampp, installed phpunit with pear.

I get this warning (though the unit-testing does work)

I’m very interested to know how to get rid of this warning (and why i’m getting it in the first place)

My first post on this board. Hi all :slight_smile:

Cheers, JJ

I had the same errors

after installing phpunit dbunit package with

PEAR install phpunit/DbUnit

all errors have gone

Yes, that did the trick!

Thanks transcendx!

Cheers, JJ

Thanks, same issue as the others. This solved the issue!

Thank you! Works for me too. :)

Thank you very much! That did the trick.

But it does not work for me and still I get the same warning message.


I get almost same warning like listed above but that is database error and i am getting story error.

Do any one have idea what it means? Am i missing anything?

Warning: include(PHPUnit_Extensions_Story_TestCase.php): failed to open stream:

No such file or directory in D:\xampp\htdocs\yii1112\framework\YiiBase.php on li

ne 423

Warning: include(): Failed opening 'PHPUnit_Extensions_Story_TestCase.php' for i

nclusion (include_path='.<img src='' class='bbc_emoticon' alt=';D' />:\xampp\htdocs\sms_dev\protected\extensions\yii-mail;



PEAR') in D:\xampp\htdocs\yii1112\framework\YiiBase.php on line 423

session_regenerate_id(): Cannot regenerate session id - headers already sent

I encountered the same problem, and I found this solution that helped me: http:/ /

Just remove the space in the beginning of the link. The forum won’t let me embed links.

Apparently, I had to install another PHPUnit extension called PHPUnit_Story. For someone not familiar with PEAR, all this is so confusing, but it looks like I finally got it to work.