You are here

protected function MailgunKernelTestBase::setConfigValue in Mailgun 8

Sets the Mailgun configuration value.

Parameters

string $config_name: The config key name.

string $config_value: The config key value.

1 call to MailgunKernelTestBase::setConfigValue()
MailgunFactoryTest::testClientService in tests/src/Kernel/MailgunFactoryTest.php
Make sure the client may be retrieved as a service.

File

tests/src/Kernel/MailgunKernelTestBase.php, line 36

Class

MailgunKernelTestBase
Mailgun kernel test base class.

Namespace

Drupal\Tests\mailgun\Kernel

Code

protected function setConfigValue($config_name, $config_value) {

  /** @var \Drupal\Core\Config\ConfigFactoryInterface $config_factory */
  $config_factory = $this->container
    ->get('config.factory');
  $config_factory
    ->getEditable(MailgunHandlerInterface::CONFIG_NAME)
    ->set($config_name, $config_value)
    ->save();
}