Tôi có tệp thử nghiệm sau, ví dụ trên trang web của PHPUnit.PHPUnit không hoạt động trong PHPStorm
<?php
require_once 'PHPUnit/Autoload.php';
class StackTest extends PHPUnit_Framework_TestCase
{
public function testPushAndPop()
{
$stack = array();
$this->assertEquals(0, count($stack));
array_push($stack, 'foo');
$this->assertEquals('foo', $stack[count($stack)-1]);
$this->assertEquals(1, count($stack));
$this->assertEquals('foo', array_pop($stack));
$this->assertEquals(0, count($stack));
}
}
?>
Tôi cố gắng để chạy nó trong PHPStorm 5.0, nhưng tôi nhận được lỗi sau:
E:\wamp\bin\php\php5.3.13\php.exe C:\Users\<user>\AppData\Local\Temp\ide-phpunit.php --no-configuration StackTest E:\wamp\www\renting\tests\StackTest.php
Testing started at 03:37 ...
SCREAM: Error suppression ignored for
Warning: require_once(PHPUnit/Runner/Version.php): failed to open stream: No such file or directory in C:\Users\<user>\AppData\Local\Temp\ide-phpunit.php on line 166
Bất cứ ý tưởng tại sao nó sẽ C: khi tôi đã thiết lập bao gồm đường dẫn đến E: ?
Chỉ muốn để lại điều này ở đây: [End of Life cho Phương pháp PEAR cài đặt] (https://github.com/sebastianbergmann/phpunit/wiki/End-of-Life-for-PEAR-Installation -Phương pháp) –