File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<?php
22
33use Illuminate \Cache \DatabaseStore ;
4+ use Illuminate \Contracts \Cache \Repository ;
45use Illuminate \Support \Facades \Artisan ;
56use Illuminate \Support \Facades \DB ;
67use Spatie \Permission \Contracts \Permission ;
@@ -256,7 +257,7 @@ function assertQueryCount(int $expected): void
256257 $ registrar ->cacheKey = $ this ->registrar ->cacheKey ;
257258 $ registrar ->shouldReceive ('forgetCachedPermissions ' )->once ()->andReturn (false );
258259
259- $ cacheRepository = Mockery::mock (Illuminate \ Contracts \ Cache \ Repository::class);
260+ $ cacheRepository = Mockery::mock (Repository::class);
260261 $ cacheRepository ->shouldReceive ('has ' )->with ($ registrar ->cacheKey )->andReturn (true );
261262 $ registrar ->shouldReceive ('getCacheRepository ' )->once ()->andReturn ($ cacheRepository );
262263
Original file line number Diff line number Diff line change 11<?php
22
3+ use Illuminate \Cache \ArrayStore ;
4+ use Illuminate \Database \Eloquent \Collection ;
35use Illuminate \Support \Facades \DB ;
46use Spatie \Permission \Contracts \Permission as PermissionContract ;
57use Spatie \Permission \Contracts \Role as RoleContract ;
174176 app (PermissionRegistrar::class)->initializeCache ();
175177
176178 expect (app (PermissionRegistrar::class)->getCacheStore ())
177- ->toBeInstanceOf (Illuminate \ Cache \ ArrayStore::class);
179+ ->toBeInstanceOf (ArrayStore::class);
178180});
179181
180182it ('retries loading permissions when another load is already in progress ' , function () {
188190
189191 $ permissions = $ registrar ->getPermissions ();
190192
191- expect ($ permissions )->toBeInstanceOf (Illuminate \ Database \ Eloquent \ Collection::class);
193+ expect ($ permissions )->toBeInstanceOf (Collection::class);
192194 expect ($ loadingProperty ->getValue ($ registrar ))->toBeFalse ();
193195});
You can’t perform that action at this time.
0 commit comments