当前位置:  开发笔记 > 编程语言 > 正文

phpstorm9 phpunit debug总是找不到基类

这个是debug之后console的提示信息,总是基类notfound{代码}
这个是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

推荐阅读
mobiledu2402851377
这个屌丝很懒,什么也没留下!
DevBox开发工具箱 | 专业的在线开发工具网站    京公网安备 11010802040832号  |  京ICP备19059560号-6
Copyright © 1998 - 2020 DevBox.CN. All Rights Reserved devBox.cn 开发工具箱 版权所有