public function SimpleLdapServerTest::testGetServerType in Simple LDAP 8
@dataProvider serverTypeDataProvider
File
- tests/
src/ Unit/ SimpleLdapServerTest.php, line 238 - Contains \Drupal\Tests\simple_ldap\Unit\SimpleLdapServer
Class
- SimpleLdapServerTest
- @coversDefaultClass \Drupal\simple_ldap\SimpleLdapServer @group simple_ldap
Namespace
Drupal\Tests\simple_ldap\UnitCode
public function testGetServerType($expected, $rootdse_results) {
$this
->setUpSearchTestMocks($rootdse_results);
$this->ldap
->expects($this
->once())
->method('ldapRead')
->willReturn('12345678');
// Arbitrary value to simulate an LDAP search identifier resource.
$server = new SimpleLdapServer($this->config_factory, $this->ldap);
$server
->connect();
$server
->bind();
$type = $server
->getServerType();
}