public function SimpleLdapServerTest::testSetPageSizeUnavailable in Simple LDAP 8
@covers ::getPageSize @covers ::setRootDse @depends testSearch
File
- tests/
src/ Unit/ SimpleLdapServerTest.php, line 209 - 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 testSetPageSizeUnavailable() {
$test_results = array(
'' => array(
'supportedcontrol' => array(
'1.2.840.113556.1.4.xxxx',
'returned_value_2',
),
),
'count' => 1,
0 => 'test_result',
);
$this->config
->expects($this
->once())
->method('get')
->with('pagesize')
->willReturn(10);
$this
->setUpSearchTestMocks($test_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();
$result = $server
->getPageSize();
$this
->assertFalse($result);
}