summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/user_ldap/tests/wizard.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/user_ldap/tests/wizard.php b/apps/user_ldap/tests/wizard.php
index f3178332ae5..2b5cabc705d 100644
--- a/apps/user_ldap/tests/wizard.php
+++ b/apps/user_ldap/tests/wizard.php
@@ -30,6 +30,18 @@ use \OCA\user_ldap\lib\Wizard;
// use \OCA\user_ldap\lib\ILDAPWrapper;
class Test_Wizard extends \PHPUnit_Framework_TestCase {
+ public function setUp() {
+ //we need to make sure the consts are defined, otherwise tests will fail
+ //on systems without php5_ldap
+ $ldapConsts = array('LDAP_OPT_PROTOCOL_VERSION',
+ 'LDAP_OPT_REFERRALS', 'LDAP_OPT_NETWORK_TIMEOUT');
+ foreach($ldapConsts as $const) {
+ if(!defined($const)) {
+ define($const, 42);
+ }
+ }
+ }
+
private function getWizardAndMocks() {
static $conMethods;