-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
some quick pseudocode before I forget:
<?php
use PHPUnit\Framework\TestCase;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPOpenLDAPer\LDAPConn;
use PHPOpenLDAPer\LDAPEntry;
class LDAPEntryTest extends TestCase {
public function testGetAndSetAttributes()
{
$attributesBefore = $entry->getAttributes();
$entry->setAttributes([]);
$entry->setAttributes($attributesBefore);
$attributesAfter = $entry->getAttributes();
$this->assertEquals($attributesBefore, $attributesAfter);
}
public function testDelete()
{
$this->assertTrue($entry->exists());
$entry->delete();
$this->assertFalse($entry->exists());
}
public function testDuplicates()
{
$entry1 = $this->ldapConn->getEntry($dn);
$entry2 = $this->ldapConn->getEntry($dn);
$this->assertSame($entry1, $entry2);
}
}Metadata
Metadata
Assignees
Labels
No labels