Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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. How should I run debug session on a particular test using vendor/bin/simple-phpunit?

like image 871
eRIZ Avatar asked Apr 08 '18 23:04

eRIZ


1 Answers

It's a bit hidden right now.

  1. Run vendor/bin/simple-phpunit to fetch some not-so-visible dependencies,
  2. Setup a new test framework within PHPStorm using this path: /vendor/bin/.phpunit/phpunit-5.7/phpunit with path to composer.phar checked. Keep in mind not to forget specifying phpunit.xml as default configuration to provide autoloaders,
  3. All now works.
like image 95
eRIZ Avatar answered Sep 22 '22 10:09

eRIZ