From: Dan Brown Date: Sat, 22 Jul 2017 16:22:31 +0000 (+0100) Subject: Defined LDAP constant for testing without LDAP installed X-Git-Tag: v0.17.3~1^2 X-Git-Url: http://source.bookstackapp.com/bookstack/commitdiff_plain/f200b4183d6c49cabdc4a36e687bc87f764c094a Defined LDAP constant for testing without LDAP installed --- diff --git a/tests/Auth/LdapTest.php b/tests/Auth/LdapTest.php index 1b7dc8184..76da6286d 100644 --- a/tests/Auth/LdapTest.php +++ b/tests/Auth/LdapTest.php @@ -11,6 +11,7 @@ class LdapTest extends BrowserKitTest public function setUp() { parent::setUp(); + if (!defined('LDAP_OPT_REFERRALS')) define('LDAP_OPT_REFERRALS', 1); app('config')->set(['auth.method' => 'ldap', 'services.ldap.base_dn' => 'dc=ldap,dc=local', 'auth.providers.users.driver' => 'ldap']); $this->mockLdap = \Mockery::mock(\BookStack\Services\Ldap::class); $this->app['BookStack\Services\Ldap'] = $this->mockLdap;