をスローOKです:PHPUnitの3.6.10 +のNetBeans 7.1:良いテストがCMDLINEすべてが例外
NetBeans7.1に呼び出されd:\xampp\htdocs\PhpProject1\Tests>phpunit TestStub.php
PHPUnit 3.6.10 by Sebastian Bergmann.
.
Time: 0 seconds, Memory: 2.75Mb
OK (1 test, 1 assertion)
:
Fatal error: Uncaught exception 'PHPUnit_Framework_Exception' with message 'Could not find class "" in "D:\Program Files (x86)\NetBeans 7.1\php\phpunit\NetBeansSuite.php".' in D:\xampp\php\PEAR\PHPUnit\Util\Skeleton\Test.php:123
Stack trace:
0 D:\xampp\php\PEAR\PHPUnit\TextUI\Command.php(157): PHPUnit_Util_Skeleton_Test->__construct('', 'D:\Program File...')
1 D:\xampp\php\PEAR\PHPUnit\TextUI\Command.php(130): PHPUnit_TextUI_Command->run(Array, true)
2 D:\xampp\php\phpunit(46): PHPUnit_TextUI_Command::main()
3 {main}
thrown in D:\xampp\php\PEAR\PHPUnit\Util\Skeleton\Test.php on line 123
私は、これは、NetBeansの問題だと思います。私が実行した場合 :
d:\Program Files (x86)\NetBeans 7.1\php\phpunit>phpunit NetBeansSuite.php run=d:\xampp\htdocs\PhpProject1\Tests\TestStub.php
PHPUnit 3.6.10 by Sebastian Bergmann.
.
Time: 0 seconds, Memory: 2.75Mb
OK (1 test, 1 assertion)
それはOKです。しかし、私がテストディレクトリを与えると失敗します。
d:\Program Files (x86)\NetBeans 7.1\php\phpunit>phpunit NetBeansSuite.php run=d:\xampp\htdocs\PhpProject1\Tests\
Fatal error: Uncaught exception 'PHPUnit_Framework_Exception' with message 'Could not find class "" in "D:\Program Files (x86)\NetBeans 7.1\php\phpunit\NetBea
nsSuite.php".' in D:\xampp\php\PEAR\PHPUnit\Util\Skeleton\Test.php:123
Stack trace:
0 D:\xampp\php\PEAR\PHPUnit\TextUI\Command.php(157): PHPUnit_Util_Skeleton_Test->__construct('', 'D:\Program File...')
1 D:\xampp\php\PEAR\PHPUnit\TextUI\Command.php(130): PHPUnit_TextUI_Command->run(Array, true)
2 D:\xampp\php\phpunit(46): PHPUnit_TextUI_Command::main()
3 {main}
thrown in D:\xampp\php\PEAR\PHPUnit\Util\Skeleton\Test.php on line 123
一時的な解決策はありますか?
「d:¥Program Files(x86)¥NetBeans 7.1¥php¥phpunit¥NetBeansSuite.php」の行118は、解答 を示しています。return self :: rglob( "* [Tt] est.php" 、$ run.DIRECTORY_SEPARATOR); テストファイル名を終了する必要があります... Test.php – shuttle
NetBeansを 'bootstrap.php'ファイルや/または' phpunit.xml'ファイルにポイントしましたか? –
私は個人的に、NetBeansのPHPUnitのサポートには問題があり、代わりにコマンドラインで単体テストを実行することを躊躇しています。 – Hades