MailgunFactoryTest.php in Mailgun 8
File
tests/src/Kernel/MailgunFactoryTest.php
View source
<?php
namespace Drupal\Tests\mailgun\Kernel;
use Drupal\mailgun\MailgunFactory;
use Mailgun\Mailgun;
class MailgunFactoryTest extends MailgunKernelTestBase {
public function testCreate() {
$factory = $this->container
->get('mailgun.mailgun_client_factory');
$this
->assertInstanceOf(MailgunFactory::class, $factory);
$this
->assertInstanceOf(Mailgun::class, $factory
->create());
}
public function testClientService() {
$api_key = 'test';
$this
->setConfigValue('api_key', $api_key);
$mailgun = $this->container
->get('mailgun.mailgun_client');
$this
->assertInstanceOf(Mailgun::class, $mailgun);
}
}