protected function QueryEntityFormTest::setUp in Lightweight Directory Access Protocol (LDAP) 8.4
Sets up the test.
Overrides BrowserTestBase::setUp
File
- ldap_query/
tests/ src/ Functional/ QueryEntityFormTest.php, line 42
Class
- QueryEntityFormTest
- Test the admin form.
Namespace
Drupal\Tests\ldap_query\FunctionalCode
protected function setUp() : void {
parent::setUp();
$manager = $this->container
->get('entity_type.manager');
$server = $manager
->getStorage('ldap_server')
->create([
'id' => 'my_test_server_1',
'label' => 'My Test Server 1',
'timeout' => 30,
'encryption' => 'none',
'address' => 'example',
'port' => 963,
'basedn' => [
'ou=people,dc=hogwarts,dc=edu',
],
'user_attr' => 'cn',
'unique_persistent_attr' => 'uid',
'status' => TRUE,
'mail_attr' => 'mail',
]);
$server
->save();
}