Defined LDAP constant for testing without LDAP installed

This commit is contained in:
Dan Brown 2017-07-22 17:22:31 +01:00
parent 33642c20ec
commit f200b4183d
No known key found for this signature in database
GPG key ID: 46D9F943C24A2EF9

View file

@ -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;