IntegrationTests.php in Lightweight Directory Access Protocol (LDAP) 8.3
File
ldap_user/tests/src/Kernel/IntegrationTests.php
View source
<?php
namespace Drupal\Tests\ldap_user\Kernel;
use Drupal\KernelTests\KernelTestBase;
use Drupal\ldap_user\Processor\DrupalUserProcessor;
class IntegrationTests extends KernelTestBase {
public static $modules = [
'authorization',
'ldap_servers',
'ldap_user',
'user',
];
private $configFactory;
public function setUp() {
parent::setUp();
$this
->installConfig([
'ldap_user',
]);
$this->configFactory = $this->container
->get('config.factory');
}
public function testConfig() {
$value = $this->configFactory
->get('ldap_user.settings')
->get('orphanedAccountCheckInterval');
$this
->assertEquals('weekly', $value);
}
public function brokenTestProcessor() {
$processor = new DrupalUserProcessor();
$result = $processor
->provisionDrupalAccount([
'name' => 'hpotter',
]);
$user = $processor
->getUserAccount();
$this
->assertInstanceOf('\\Drupal\\user\\Entity\\User', $user);
}
}