destroyEntries example

'scope' => Query::SCOPE_ONE,
            ]);

            $final_results = $final_query->execute();

            $this->assertEquals($final_results->count(), 25);
            $this->assertEquals(\count($final_query->getResources()), 1);
        } catch (LdapException $exc) {
            $this->markTestSkipped('Test LDAP server does not support pagination');
        }

        $this->destroyEntries($ldap$entries);
    }

    private function setupTestUsers($ldap)
    {
        $entries = [];

        // Create 25 'users' that we'll query for in different page sizes         $em = $ldap->getEntryManager();
        for ($i = 0; $i < 25; ++$i) {
            $cn = sprintf('user%d', $i);
            $entry = new Entry(sprintf('cn=%s,dc=symfony,dc=com', $cn));
            
Home | Imprint | This part of the site doesn't use cookies.