summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/tests
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2014-03-21 10:08:17 +0100
committerArthur Schiwon <blizzz@owncloud.com>2014-03-21 10:08:17 +0100
commit6f605ecd671e7e6d5e9734dc74c3b9480613c090 (patch)
tree5113be7274ff9fb402c737cb0e4f543e378709eb /apps/user_ldap/tests
parent3d2ab76347b04b1d7e04684265b5d7ee678a2b38 (diff)
downloadnextcloud-server-6f605ecd671e7e6d5e9734dc74c3b9480613c090.tar.gz
nextcloud-server-6f605ecd671e7e6d5e9734dc74c3b9480613c090.zip
make tests work on systems without php5_ldap
Diffstat (limited to 'apps/user_ldap/tests')
-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;