Symfony 3.4 – Inject variable from parameters.yml/config_test.yml into test case

I have in my parameters.yml file


and in my config_test.yml

    api_domain: api.localhost

I have a test case with

$this->client = static::createClient(
        'HTTP_HOST' => 'api.localhost'

and I need to replace ‘api.localhost’ with the parameter api_domain based off of the environment

Any ideas how how I can do this?

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *