Skip to content
This repository was archived by the owner on Jul 24, 2023. It is now read-only.

Commit 2c219a8

Browse files
committed
Added contract resolution test
1 parent 6062461 commit 2c219a8

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/AdldapServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function register()
5050
});
5151

5252
// Bind the Adldap contract to the Adldap implementation
53-
$this->app->bind('Adldap\Contracts\Adldap', 'Adldap\Adldap');
53+
$this->app->bind('Adldap\Contracts\Adldap', 'adldap');
5454
}
5555

5656
/**

tests/AdldapTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,16 @@ public function testRegistration()
2525
$this->assertTrue(app()->register('Adldap\Laravel\AdldapAuthServiceProvider'));
2626
}
2727

28+
public function testContractResolve()
29+
{
30+
$this->app['config']->set('adldap.auto_connect', false);
31+
32+
$adldap = $this->app->make('Adldap\Contracts\Adldap');
33+
34+
$this->assertInstanceOf('Adldap\Adldap', $adldap);
35+
$this->assertInstanceOf('Adldap\Contracts\Adldap', $adldap);
36+
}
37+
2838
public function testAuthPasses()
2939
{
3040
$mockedBuilder = Mockery::mock('Adldap\Query\Builder');

0 commit comments

Comments
 (0)