eRIZ
eRIZ

Reputation: 1507

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?

Upvotes: 6

Views: 2206

Answers (1)

eRIZ
eRIZ

Reputation: 1507

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.

Upvotes: 7

Related Questions