public function test_getAllUserLogins_ReturnsLdapEntities()
 {
     $mockLdapClient = $this->makeMockLdapClient($forSuccess = false);
     $usedFilter = null;
     $mockLdapClient->expects($this->any())->method('bind')->will($this->returnValue(true));
     $mockLdapClient->expects($this->any())->method('fetchAll')->will($this->returnCallback(function ($baseDn, $filter, $bind) use(&$usedFilter) {
         $usedFilter = $filter;
         return array(array('uid' => LdapUsersTest::TEST_USER), array('uid' => LdapUsersTest::TEST_ADMIN_USER));
     }));
     $this->ldapUsers->setLdapClientClass($mockLdapClient);
     $this->setSingleLdapServer();
     $logins = $this->ldapUsers->getAllUserLogins();
     $this->assertEquals(array(self::TEST_USER, self::TEST_ADMIN_USER), $logins);
 }