Answer the question
In order to leave comments, you need to log in
HomeBrew + PHPUnit + PhpStorm, how to make it work?
I have Mac OS X with HomeBrew installed. It has already happened that it seems to me that it is easier to install the necessary software through brew:
brew install phpunit
==> Downloading https://phar.phpunit.de/phpunit-4.0.1.phar
Already downloaded: /Library/Caches/Homebrew/phpunit-4.0.1.phar
/usr/local/Cellar/phpunit/4.0.1: 3 files, 3.1M, built in 2 seconds
phpunit ~/Sites/localhost/PHPUnit/test.php
PHPUnit 4.0.1 by Sebastian Bergmann.
..
Time: 35 ms, Memory: 3.25Mb
OK (2 tests, 2 assertions)
PHP Warning: require_once(PHPUnit/Runner/Version.php): failed to open stream: No such file or directory in /private/var/folders/kg/gxwxzvp15lq254j52xbr4tnr0000gn/T/ide-phpunit.php on line 39
PHP Fatal error: require_once(): Failed opening required 'PHPUnit/Runner/Version.php' (include_path='.:/usr/local/Cellar/php55/5.5.10/lib/php:/usr/local/bin') in /private/var/folders/kg/gxwxzvp15lq254j52xbr4tnr0000gn/T/ide-phpunit.php on line 39
/usr/local/Cellar/phpunit/4.0.1/libexec/phpunit-4.0.1.phar
Answer the question
In order to leave comments, you need to log in
PhpStorm is not compatible with phpUnit > 4
Just comment out all require_once in CTestCase.php to make it work
require_once('PHPUnit/Runner/Version.php');
require_once('PHPUnit/Util/Filesystem.php'); // workaround for PHPUnit <= 3.6.11
require_once('PHPUnit/Autoload.php');
abstract class TestCase extends PHPUnit_Framework_TestCase
{
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question