当前位置:Gxlcms > PHP教程 > phpstorm9phpunitdebug总是找不到基类

phpstorm9phpunitdebug总是找不到基类

时间:2021-07-01 10:21:17 帮助过:62人阅读

这个是debug之后 console的提示信息 ,总是基类not found

php/bin/php -dxdebug.remote_enable=1 -dxdebug.remote_mode=req -dxdebug.remote_port=9000 -dxdebug.remote_host=127.0.0.1 /tmp/ide-phpunit.php --no-configuration --filter "/::testGetInfo( .*)?$/" Test_User_UserControllerTest /PHPUnit/Test/User/UserControllerTest.php
Testing started at 上午11:47 ...
PHP Fatal error:  Class 'TestCase' not found in /PHPUnit/Test/User/UserControllerTest.php on line 3

PHP Stack trace:
PHP   1. {main}() /tmp/ide-phpunit.php:0
PHP   2. IDE_Base_PHPUnit_TextUI_Command::main($exit = *uninitialized*) /tmp/ide-phpunit.php:552

Fatal error: Class 'TestCase' not found in /PHPUnit/Test/User/UserControllerTest.php on line 3
PHP   3. PHPUnit_TextUI_Command->run($argv = *uninitialized*, $exit = *uninitialized*) /tmp/ide-phpunit.php:294

Call Stack:
PHP   4. PHPUnit_Runner_BaseTestRunner->getTest($suiteClassName = *uninitialized*, $suiteClassFile = *uninitialized*, $suffixes = *uninitialized*) phar:///usr/local/php/bin/phpunit-old.phar/phpunit/TextUI/Command.php:123
    0.1526     361400   1. {main}() /tmp/ide-phpunit.php:0
    0.2568   13365704   2. IDE_Base_PHPUnit_TextUI_Command::main(???) /tmp/ide-phpunit.php:552
PHP   5. PHPUnit_Runner_BaseTestRunner->loadSuiteClass($suiteClassName = *uninitialized*, $suiteClassFile = *uninitialized*) phar:///usr/local/php/bin/phpunit-old.phar/phpunit/Runner/BaseTestRunner.php:67
    0.2568   13372352   3. PHPUnit_TextUI_Command->run(???, ???) /tmp/ide-phpunit.php:294
PHP   6. PHPUnit_Runner_StandardTestSuiteLoader->load($suiteClassName = *uninitialized*, $suiteClassFile = *uninitialized*) phar:///usr/local/php/bin/phpunit-old.phar/phpunit/Runner/BaseTestRunner.php:123
    0.2573   13389448   4. PHPUnit_Runner_BaseTestRunner->getTest(???, ???, ???) phar:///usr/local/php/bin/phpunit-old.phar/phpunit/TextUI/Command.php:123
PHP   7. PHPUnit_Util_Fileloader::checkAndLoad($filename = *uninitialized*) phar:///usr/local/php/bin/phpunit-old.phar/phpunit/Runner/StandardTestSuiteLoader.php:39
    0.2573   13389792   5. PHPUnit_Runner_BaseTestRunner->loadSuiteClass(???, ???) phar:///usr/local/php/bin/phpunit-old.phar/phpunit/Runner/BaseTestRunner.php:67
PHP   8. PHPUnit_Util_Fileloader::load($filename = *uninitialized*) phar:///usr/local/php/bin/phpunit-old.phar/phpunit/Util/Fileloader.php:38
    0.2573   13390008   6. PHPUnit_Runner_StandardTestSuiteLoader->load(???, ???) phar:///usr/local/php/bin/phpunit-old.phar/phpunit/Runner/BaseTestRunner.php:123
PHP   9. include_once() phar:///usr/local/php/bin/phpunit-old.phar/phpunit/Util/Fileloader.php:56
    0.2576   13547472   7. PHPUnit_Util_Fileloader::checkAndLoad(???) phar:///usr/local/php/bin/phpunit-old.phar/phpunit/Runner/StandardTestSuiteLoader.php:39
    0.2576   13547664   8. PHPUnit_Util_Fileloader::load(???) phar:///usr/local/php/bin/phpunit-old.phar/phpunit/Util/Fileloader.php:38
    0.2597   13663304   9. include_once('/PHPUnit/Test/User/UserControllerTest.php') phar:///usr/local/php/bin/phpunit-old.phar/phpunit/Util/Fileloader.php:56

回复内容:

这个是debug之后 console的提示信息 ,总是基类not found

php/bin/php -dxdebug.remote_enable=1 -dxdebug.remote_mode=req -dxdebug.remote_port=9000 -dxdebug.remote_host=127.0.0.1 /tmp/ide-phpunit.php --no-configuration --filter "/::testGetInfo( .*)?$/" Test_User_UserControllerTest /PHPUnit/Test/User/UserControllerTest.php
Testing started at 上午11:47 ...
PHP Fatal error:  Class 'TestCase' not found in /PHPUnit/Test/User/UserControllerTest.php on line 3

PHP Stack trace:
PHP   1. {main}() /tmp/ide-phpunit.php:0
PHP   2. IDE_Base_PHPUnit_TextUI_Command::main($exit = *uninitialized*) /tmp/ide-phpunit.php:552

Fatal error: Class 'TestCase' not found in /PHPUnit/Test/User/UserControllerTest.php on line 3
PHP   3. PHPUnit_TextUI_Command->run($argv = *uninitialized*, $exit = *uninitialized*) /tmp/ide-phpunit.php:294

Call Stack:
PHP   4. PHPUnit_Runner_BaseTestRunner->getTest($suiteClassName = *uninitialized*, $suiteClassFile = *uninitialized*, $suffixes = *uninitialized*) phar:///usr/local/php/bin/phpunit-old.phar/phpunit/TextUI/Command.php:123
    0.1526     361400   1. {main}() /tmp/ide-phpunit.php:0
    0.2568   13365704   2. IDE_Base_PHPUnit_TextUI_Command::main(???) /tmp/ide-phpunit.php:552
PHP   5. PHPUnit_Runner_BaseTestRunner->loadSuiteClass($suiteClassName = *uninitialized*, $suiteClassFile = *uninitialized*) phar:///usr/local/php/bin/phpunit-old.phar/phpunit/Runner/BaseTestRunner.php:67
    0.2568   13372352   3. PHPUnit_TextUI_Command->run(???, ???) /tmp/ide-phpunit.php:294
PHP   6. PHPUnit_Runner_StandardTestSuiteLoader->load($suiteClassName = *uninitialized*, $suiteClassFile = *uninitialized*) phar:///usr/local/php/bin/phpunit-old.phar/phpunit/Runner/BaseTestRunner.php:123
    0.2573   13389448   4. PHPUnit_Runner_BaseTestRunner->getTest(???, ???, ???) phar:///usr/local/php/bin/phpunit-old.phar/phpunit/TextUI/Command.php:123
PHP   7. PHPUnit_Util_Fileloader::checkAndLoad($filename = *uninitialized*) phar:///usr/local/php/bin/phpunit-old.phar/phpunit/Runner/StandardTestSuiteLoader.php:39
    0.2573   13389792   5. PHPUnit_Runner_BaseTestRunner->loadSuiteClass(???, ???) phar:///usr/local/php/bin/phpunit-old.phar/phpunit/Runner/BaseTestRunner.php:67
PHP   8. PHPUnit_Util_Fileloader::load($filename = *uninitialized*) phar:///usr/local/php/bin/phpunit-old.phar/phpunit/Util/Fileloader.php:38
    0.2573   13390008   6. PHPUnit_Runner_StandardTestSuiteLoader->load(???, ???) phar:///usr/local/php/bin/phpunit-old.phar/phpunit/Runner/BaseTestRunner.php:123
PHP   9. include_once() phar:///usr/local/php/bin/phpunit-old.phar/phpunit/Util/Fileloader.php:56
    0.2576   13547472   7. PHPUnit_Util_Fileloader::checkAndLoad(???) phar:///usr/local/php/bin/phpunit-old.phar/phpunit/Runner/StandardTestSuiteLoader.php:39
    0.2576   13547664   8. PHPUnit_Util_Fileloader::load(???) phar:///usr/local/php/bin/phpunit-old.phar/phpunit/Util/Fileloader.php:38
    0.2597   13663304   9. include_once('/PHPUnit/Test/User/UserControllerTest.php') phar:///usr/local/php/bin/phpunit-old.phar/phpunit/Util/Fileloader.php:56

人气教程排行