在Debian系统上使用PhpStorm进行PHP项目的单元测试,可以按照以下步骤进行:
composer global require phpunit/phpunit
phpunit
命令。例如,在~/.bashrc
或~/.zshrc
文件中添加以下行:export PATH="$PATH:$HOME/.composer/vendor/bin"
然后运行:
source ~/.bashrc
或
source ~/.zshrc
使更改生效。
tests
。YourClassTest.php
。Run
菜单,然后选择Edit Configurations
。+
图标,然后选择PHPUnit
。Test kind
设置为All in directory
,并在Directory
字段中选择你的tests
目录。OK
保存配置。Run
菜单中选择Run ‘PHPUnit’
。Run
工具窗口中。Run
工具窗口中查看详细的测试报告。composer.json
文件中包含了必要的测试框架依赖。php.ini
文件中。通过以上步骤,你可以在Debian系统上使用PhpStorm顺利进行PHP项目的单元测试。