*/ class MagdevListmonkApiExtensionTest extends TestCase { public function testExtension(): void { $container = new ContainerBuilder(); (new MagdevListmonkApiExtension())->load([ 'magdev_listmonk' => [ 'connections' => [ 'default' => [ 'hostname' => 'https://localhost:8443', 'username' => 'listmonk', 'token' => 'listmonk', 'verify_https' => false, 'options' => [ 'logger' => [ 'filename' => 'php://stdout', 'level' => 100, ], ], ], ], ], ], $container); $client = $container->get('magdev.listmonk.default'); /** @var \Magdev\ListmonkApi\ListmonkClient $client */ $this->assertInstanceOf(ListmonkClient::class, $client); $httpClient = $client->getClient(); /** @var \Symfony\Component\HttpClient\ScopingHttpClient $httpClient */ $this->assertInstanceOf(HttpClientInterface::class, $httpClient); $this->assertInstanceOf(ScopingHttpClient::class, $httpClient); } }