I’ve been trying to run some very basic phpunit tests on one of the example project within the yii web development book and for some reason i keep on getting these errors every time… found loads of solutions and -none- of them really worked for me (especially since the pear phpunit/selenium command is deprecated so most of the solutions are not really up to date)…
Fatal error: Cannot redeclare class PHPUnit_Extensions_SeleniumTestCase in C:\wa
mp\bin\php\php5.5.12\pear\PHPUnit\Extensions\SeleniumTestCase.php on line 1217
Pase content of phpunit script (.bat or .sh depending on your system) and also this file dbTest.php
well, i can’t find the phpunit bat file anywhere on my computer actually.
and the content of the dbtest doesn’t have any functional code, i was just trying the phpunit tool and it seems to fail for the first time…
class WebTestCase extends CWebTestCase
protected function setUp()
Oh, but i’ve got phpunit cmd file that contains -
@php "%~dp0phpunit.phar" %*
This php command is takes bat/binary script from PEAR directory or from composer? Run ‘where phpunit’ and paste here the response.