Have you enabled the framework.test option in config_test.yml?
framework.test
framework: test: ~
In phpunit.xml you should have env variable like:
phpunit.xml
<env name="APP_ENV" value="test"/>
I had this problem with symfony version 3.3.13.
The config_test.yml file was fine, but I did the same mistake.
config_test.yml
I solved adding the <server name ="APP_ENV" value="test" /> option under php in the phpunit.xml file
<server name ="APP_ENV" value="test" />
php