在Composer和PHPUnit项目上使用PHPStorm(所有这些工作都已正常工作)如何在“vendor”内的composer插件上运行PHPUnit测试,在这种情况下是mikey179/vfsStream?运行phpunit测试作曲家插件vfsStream
我的项目结构如下:
myscripts/
vendor/
- mikey179
- vfsStream
composer.json
我想运行PHPUnit的测试vfsStream插件。
我能够在我自己的测试代码(外部供应商目录)上运行测试。
当我运行PHPUnit的测试(上边那个绿色的小播放按钮)我有以下几点:
usr/bin/php /tmp/ide-phpunit.php --bootstrap /path/to/project/vendor/autoload.php --configuration /path/to/project/vendor/mikey179/vfsStream/phpunit.xml.dist /path/to/project/vendor/mikey179/vfsStream
Testing started at 5:53 PM ...
PHPUnit 3.8-g8d770d8 by Sebastian Bergmann.
Configuration read from /path/to/project/vendor/mikey179/vfsStream/phpunit.xml.dist
Time: 2.22 seconds, Memory: 2.25Mb
No tests executed!
PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /path/to/project/vendor/phpunit/php-code-coverage/PHP/CodeCoverage/Report/HTML.php on line 127
PHP Stack trace:
PHP 1. {main}() /tmp/ide-phpunit.php:0
PHP 2. IDE_Base_PHPUnit_TextUI_Command::main() /tmp/ide-phpunit.php:506
PHP 3. PHPUnit_TextUI_Command->run() /tmp/ide-phpunit.php:268
PHP 4. PHPUnit_TextUI_TestRunner->doRun() /path/to/project/vendor/phpunit/phpunit/PHPUnit/TextUI/Command.php:173
PHP 5. PHP_CodeCoverage_Report_HTML->process() /path/to/project/vendor/phpunit/phpunit/PHPUnit/TextUI/TestRunner.php:465
PHP 6. date() /path/to/project/vendor/phpunit/php-code-coverage/PHP/CodeCoverage/Report/HTML.php:127
Generating code coverage report in HTML format ... done
Process finished with exit code 0
而你的问题是? – LazyOne
糟糕,忘记了。我编辑了我的问题。 – jaycode
那么..基于我从你的输出(测试运行器)看到的,你已经正确设置它(PHPUnit运行/调试配置)。忽略PHP关于缺少时区的警告(编辑你的php.ini来解决这个问题)......我看到的唯一问题是测试运行器无法找到任何测试运行的事实。为此 - 请用文件名显示屏幕截图(如果公共可用,请给出“vfsStream”的链接)。最有可能的测试不遵循标准的命名规则。或者没有实际选择测试。 – LazyOne