/** * @expectedException \Piwik\Exception\ErrorException * @expectedExceptionMessage triggered error */ public function test_close_ThrowsPhpErrors() { $this->setPiwikErrorHandling(); $this->addLdapConnectMethodMock(); $this->addLdapMethodThatTriggersPhpError('ldap_close'); $ldapClient = new LdapClient("hostname", 1234); $ldapClient->close(); }
private function closeLdapClient() { $this->ldapClient->close(); $this->ldapClient = null; }