php - How to use PHPUnit in Behat when using Symfony's PHPUnit Bridge? -


in behat context, i've been included phpunit's assertions described in the manual:

require_once 'phpunit/autoload.php'; require_once 'phpunit/framework/assert/functions.php'; 

however, i'm using symfony's phpunit bridge , i've removed explicitly-installed phpunit , using 1 brought in bridge. needed avoid "multiple versions" error described here.

but now, can't use phpunit in behat!

php warning:  uncaught exception 'symfony\component\debug\exception\contexterrorexception' message 'warning: require_once(phpunit/autoload.php): failed open stream: no such file or directory' 

how can reference phpunit instance brought in phpunit bridge?

it turned out needed require relevant files in vendor path instead. me, was:

require_once(__dir__.'/../../vendor/symfony/phpunit-bridge/bin/.phpunit/phpunit-5.7/vendor/autoload.php'); require_once(__dir__.'/../../vendor/symfony/phpunit-bridge/bin/.phpunit/phpunit-5.7/src/framework/assert/functions.php'); 

Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -