PHPUnit no output

I’m trying to run phpunit tests (with 3.6.4 version of PHPUnit). But then i run “phpunit” command on “protected/tests” - nothing happen. Can anyone tell, what im doing wrong?

Define ‘nothing’ …

Unless you are getting an error message, you should get some kind of output.

If you want phpunit to print more than a dot (for successful tests), run phpunit with the debug flag: phpunit --debug

Nothing is… just nothing :) No errors, no dots etc. Just new prompt line. Tried with --verbose or other options - same result :(

Looks like this:

Ok, i found that problem raises when i require WebTestCase.php in bootstrap.php. Comment out this line - and phpunit starts working. I’m not sure, but i think problems somehow associated with Selenium, which i dont have in my system.

Odd problem…

Do you have the Selenium extension in your PHPUnit directory?

PEAR/PHPUnit/Extensions/SeleniumTestCase ?

If you don’t, then please install it. :)

Woops, i dont have this file. Strange! Where i can find this file? PHPUnit installed from PEAR as usual.

Found!


pear install phpunit/PHPUnit_Selenium

Let us know if it works or not. :)

[color="#006400"]/* moved to installation */[/color]

To avoid any issue please use XAMPP server it comes with all necessary web plugin including PHP unit,pear package and many more.

I had the same problem (OSX, MAMP), did the above and PHPUnit now produces output - thanks.

hi, I have the exact same problem:

and i have tried everything and its still not working! even selenium extension is installed.

only when my TestClass.php file is empty there is an error:




PHPUnit 3.6.10 by Sebastian Bergmann.


Class SiteTest could not be found in /Applications/MAMP/htdocs/TAClass/protected/tests/unit/SiteTest.php



otherwise its Nothing! please help me, i’ve stuck here for two days :(

p.s.: same problem occurs when i try functional testing, selenium server and other stuff are ready, but still php unit returns nothing, no errors, no messages, nothing! just a new command line!

This is an old issue but this is the first post that I ran into when searching on the web so… to solve:

check your bootstrap.php file… ensure that the line as below:

$yiit=dirname(FILE).’/../../../Yii-1.1.2/framework/yiit.php’;

correctly resolves to your framework/yiit.php path…

it may be something like :

$yiit=dirname(FILE).’/../../../framework/yiit.php’;

instead.

Anyway, hope this helps.