简体   繁体   English

如何在Symfony 4和Simple-PHPUnit中调试测试?

[英]How to debug tests within Symfony 4 and Simple-PHPUnit?

In earlier versions, it was possible to debug any unit test within functionality provided by PHPStorm. 在早期版本中,可以在PHPStorm提供的功能内调试任何单元测试。 How should I run debug session on a particular test using vendor/bin/simple-phpunit ? 我应该如何使用vendor/bin/simple-phpunit在特定测试上运行调试会话?

It's a bit hidden right now. 它现在有点隐藏了。

  1. Run vendor/bin/simple-phpunit to fetch some not-so-visible dependencies, 运行vendor/bin/simple-phpunit来获取一些不那么可见的依赖项,
  2. Setup a new test framework within PHPStorm using this path: /vendor/bin/.phpunit/phpunit-5.7/phpunit with path to composer.phar checked. 使用以下路径在PHPStorm中设置新的测试框架: /vendor/bin/.phpunit/phpunit-5.7/phpunit并检查/vendor/bin/.phpunit/phpunit-5.7/phpunitpath to composer.phar Keep in mind not to forget specifying phpunit.xml as default configuration to provide autoloaders, 请记住,不要忘记将phpunit.xml指定为默认配置以提供自动加载器,
  3. All now works. 现在一切正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM