我在让我的 PHPUnit 正常工作时遇到了问题。我遇到了很多问题,但现在我遇到了这个问题……
所以我在我的应用程序文件夹中受保护/测试......在我的控制台中我写道:
phpunit unit/DbTest.php
并得到回复(抱歉有很多信件):PS Using Wamp and Win8
PHP Warning: require_once(PHPUnit/Extensions/SeleniumTestCase.php): failed to o
pen stream: No such file or directory in C:\wamp\www\framework\test\CWebTestCase
.php on line 12
PHP Stack trace:
PHP 1. {main}() C:\wamp\bin\php\php5.3.13\phpunit:0
PHP 2. PHPUnit_TextUI_Command::main() C:\wamp\bin\php\php5.3.13\phpunit:46
PHP 3. PHPUnit_TextUI_Command->run() C:\wamp\bin\php\php5.3.13\pear\PHPUnit\Te
xtUI\Command.php:129
PHP 4. PHPUnit_TextUI_Command->handleArguments() C:\wamp\bin\php\php5.3.13\pea
r\PHPUnit\TextUI\Command.php:138
PHP 5. PHPUnit_TextUI_Command->handleBootstrap() C:\wamp\bin\php\php5.3.13\pea
r\PHPUnit\TextUI\Command.php:606
PHP 6. PHPUnit_Util_Fileloader::checkAndLoad() C:\wamp\bin\php\php5.3.13\pear\
PHPUnit\TextUI\Command.php:778
PHP 7. PHPUnit_Util_Fileloader::load() C:\wamp\bin\php\php5.3.13\pear\PHPUnit\
Util\Fileloader.php:76
PHP 8. include_once() C:\wamp\bin\php\php5.3.13\pear\PHPUnit\Util\Fileloader.p
hp:92
PHP 9. require_once() C:\wamp\www\test\protected\tests\bootstrap.php:8
PHP 10. YiiBase::autoload() C:\wamp\www\test\protected\tests\bootstrap.php:0
PHP 11. include() C:\wamp\www\framework\YiiBase.php:397
Warning: require_once(PHPUnit/Extensions/SeleniumTestCase.php): failed to open s
tream: No such file or directory in C:\wamp\www\framework\test\CWebTestCase.php
on line 12
Call Stack:
0.0003 325320 1. {main}() C:\wamp\bin\php\php5.3.13\phpunit:0
0.0081 684192 2. PHPUnit_TextUI_Command::main() C:\wamp\bin\php\php5.3
.13\phpunit:46
0.0081 684608 3. PHPUnit_TextUI_Command->run() C:\wamp\bin\php\php5.3.
13\pear\PHPUnit\TextUI\Command.php:129
0.0081 684608 4. PHPUnit_TextUI_Command->handleArguments() C:\wamp\bin
\php\php5.3.13\pear\PHPUnit\TextUI\Command.php:138
0.0152 1197056 5. PHPUnit_TextUI_Command->handleBootstrap() C:\wamp\bin
\php\php5.3.13\pear\PHPUnit\TextUI\Command.php:606
0.0157 1209440 6. PHPUnit_Util_Fileloader::checkAndLoad() C:\wamp\bin\p
hp\php5.3.13\pear\PHPUnit\TextUI\Command.php:778
0.0164 1209536 7. PHPUnit_Util_Fileloader::load() C:\wamp\bin\php\php5.
3.13\pear\PHPUnit\Util\Fileloader.php:76
0.0167 1214200 8. include_once('C:\wamp\www\test\protected\tests\boo
tstrap.php') C:\wamp\bin\php\php5.3.13\pear\PHPUnit\Util\Fileloader.php:92
0.0212 1495872 9. require_once('C:\wamp\www\test\protected\tests\Web
TestCase.php') C:\wamp\www\test\protected\tests\bootstrap.php:8
0.0213 1496136 10. YiiBase::autoload() C:\wamp\www\test\protected\tes
ts\bootstrap.php:0
0.0220 1519520 11. include('C:\wamp\www\framework\test\CWebTestCase.php'
) C:\wamp\www\framework\YiiBase.php:397
PHP Fatal error: require_once(): Failed opening required 'PHPUnit/Extensions/Se
leniumTestCase.php' (include_path='.;C:\wamp\bin\php\php5.3.13\pear') in C:\wamp
\www\framework\test\CWebTestCase.php on line 12
PHP Stack trace:
PHP 1. {main}() C:\wamp\bin\php\php5.3.13\phpunit:0
PHP 2. PHPUnit_TextUI_Command::main() C:\wamp\bin\php\php5.3.13\phpunit:46
PHP 3. PHPUnit_TextUI_Command->run() C:\wamp\bin\php\php5.3.13\pear\PHPUnit\Te
xtUI\Command.php:129
PHP 4. PHPUnit_TextUI_Command->handleArguments() C:\wamp\bin\php\php5.3.13\pea
r\PHPUnit\TextUI\Command.php:138
PHP 5. PHPUnit_TextUI_Command->handleBootstrap() C:\wamp\bin\php\php5.3.13\pea
r\PHPUnit\TextUI\Command.php:606
PHP 6. PHPUnit_Util_Fileloader::checkAndLoad() C:\wamp\bin\php\php5.3.13\pear\
PHPUnit\TextUI\Command.php:778
PHP 7. PHPUnit_Util_Fileloader::load() C:\wamp\bin\php\php5.3.13\pear\PHPUnit\
Util\Fileloader.php:76
PHP 8. include_once() C:\wamp\bin\php\php5.3.13\pear\PHPUnit\Util\Fileloader.p
hp:92
PHP 9. require_once() C:\wamp\www\test\protected\tests\bootstrap.php:8
PHP 10. YiiBase::autoload() C:\wamp\www\test\protected\tests\bootstrap.php:0
PHP 11. include() C:\wamp\www\framework\YiiBase.php:397
Fatal error: require_once(): Failed opening required 'PHPUnit/Extensions/Seleniu
mTestCase.php' (include_path='.;C:\wamp\bin\php\php5.3.13\pear') in C:\wamp\www\
framework\test\CWebTestCase.php on line 12
Call Stack:
0.0003 325320 1. {main}() C:\wamp\bin\php\php5.3.13\phpunit:0
0.0081 684192 2. PHPUnit_TextUI_Command::main() C:\wamp\bin\php\php5.3
.13\phpunit:46
0.0081 684608 3. PHPUnit_TextUI_Command->run() C:\wamp\bin\php\php5.3.
13\pear\PHPUnit\TextUI\Command.php:129
0.0081 684608 4. PHPUnit_TextUI_Command->handleArguments() C:\wamp\bin
\php\php5.3.13\pear\PHPUnit\TextUI\Command.php:138
0.0152 1197056 5. PHPUnit_TextUI_Command->handleBootstrap() C:\wamp\bin
\php\php5.3.13\pear\PHPUnit\TextUI\Command.php:606
0.0157 1209440 6. PHPUnit_Util_Fileloader::checkAndLoad() C:\wamp\bin\p
hp\php5.3.13\pear\PHPUnit\TextUI\Command.php:778
0.0164 1209536 7. PHPUnit_Util_Fileloader::load() C:\wamp\bin\php\php5.
3.13\pear\PHPUnit\Util\Fileloader.php:76
0.0167 1214200 8. include_once('C:\wamp\www\test\protected\tests\boo
tstrap.php') C:\wamp\bin\php\php5.3.13\pear\PHPUnit\Util\Fileloader.php:92
0.0212 1495872 9. require_once('C:\wamp\www\test\protected\tests\Web
TestCase.php') C:\wamp\www\test\protected\tests\bootstrap.php:8
0.0213 1496136 10. YiiBase::autoload() C:\wamp\www\test\protected\tes
ts\bootstrap.php:0
0.0220 1519520 11. include('C:\wamp\www\framework\test\CWebTestCase.php'
) C:\wamp\www\framework\YiiBase.php:397