Skip to content
This repository has been archived by the owner on Jul 24, 2023. It is now read-only.

Commit

Permalink
Added test
Browse files Browse the repository at this point in the history
  • Loading branch information
stevebauman committed Dec 18, 2019
1 parent 8d70b03 commit 7e4245b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/Connections/LdapTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,19 @@ public function test_get_detailed_error_returns_null_when_error_number_is_zero()

$this->assertNull($ldap->getDetailedError());
}

public function test_closing_connection_sets_bound_to_false()
{
$ldap = new ConnectedLdapStub();
$this->assertTrue($ldap->isBound());

$ldap->close();

$this->assertFalse($ldap->isBound());
}
}

class ConnectedLdapStub extends Ldap
{
protected $bound = true;
}

0 comments on commit 7e4245b

Please sign in to comment.