|
11 | 11 | use Adldap\Query\Builder; |
12 | 12 | use Adldap\Schemas\Schema; |
13 | 13 | use Adldap\Search\Factory; |
| 14 | +use Adldap\Contracts\AdldapInterface; |
14 | 15 | use Illuminate\Support\Facades\App; |
15 | 16 | use Illuminate\Support\Facades\Auth; |
16 | 17 |
|
@@ -47,9 +48,9 @@ public function test_registration() |
47 | 48 |
|
48 | 49 | public function test_contract_resolve() |
49 | 50 | { |
50 | | - $adldap = $this->app->make('Adldap\Contracts\AdldapInterface'); |
| 51 | + $adldap = $this->app->make(AdldapInterface::class); |
51 | 52 |
|
52 | | - $this->assertInstanceOf('Adldap\Contracts\AdldapInterface', $adldap); |
| 53 | + $this->assertInstanceOf(AdldapInterface::class, $adldap); |
53 | 54 | } |
54 | 55 |
|
55 | 56 | public function test_auth_passes() |
@@ -94,8 +95,8 @@ public function test_auth_passes_with_persistent_adldap_user() |
94 | 95 | { |
95 | 96 | $this->test_auth_passes(); |
96 | 97 |
|
97 | | - $this->assertInstanceOf('Adldap\Models\User', \Auth::user()->adldapUser); |
98 | | - $this->assertInstanceOf('Adldap\Models\User', auth()->user()->adldapUser); |
| 98 | + $this->assertInstanceOf(User::class, \Auth::user()->adldapUser); |
| 99 | + $this->assertInstanceOf(User::class, auth()->user()->adldapUser); |
99 | 100 | } |
100 | 101 |
|
101 | 102 | public function test_auth_passes_without_persistent_adldap_user() |
@@ -166,7 +167,7 @@ public function test_auth_fails_when_user_not_found() |
166 | 167 | public function test_credentials_key_does_not_exist() |
167 | 168 | { |
168 | 169 | $mockedProvider = $this->mock(Provider::class); |
169 | | - $mockedSearch = $this->mock('Adldap\Search\Factory'); |
| 170 | + $mockedSearch = $this->mock(Factory::class); |
170 | 171 | $mockedSearch->shouldReceive('select')->once()->andReturn($mockedSearch); |
171 | 172 |
|
172 | 173 | $manager = new Manager(); |
@@ -203,7 +204,7 @@ public function test_config_login_fallback() |
203 | 204 | $this->app['config']->set('adldap_auth.login_fallback', true); |
204 | 205 |
|
205 | 206 | $mockedProvider = $this->mock(Provider::class); |
206 | | - $mockedSearch = $this->mock('Adldap\Search\Factory'); |
| 207 | + $mockedSearch = $this->mock(Factory::class); |
207 | 208 | $mockedSearch->shouldReceive('select')->andReturn($mockedSearch); |
208 | 209 | $mockedSearch->shouldReceive('whereEquals')->andReturn($mockedSearch); |
209 | 210 | $mockedSearch->shouldReceive('first')->andReturn(null); |
|
0 commit comments