InteractsWithFakeStores
trait InteractsWithFakeStores
Properties
| protected FakeStoreGateway|null | $fakeStoreGateway | The fake store gateway instance. |
|
| protected array | $recordedStoreCreations | All of the recorded store creations. |
|
| protected array | $recordedStoreDeletions | All of the recorded store deletions. |
|
| protected array | $recordedFileAdditions | All of the recorded file additions. |
|
| protected array | $recordedFileRemovals | All of the recorded file removals. |
Methods
Record a store creation.
Record a store deletion.
Record a file addition to a store.
Record a file removal from a store.
Assert that a store was created matching a given truth test.
Assert that a store was not created matching a given truth test.
Assert that no stores were created.
Assert that a store was deleted matching a given truth test.
Assert that a store was not deleted matching a given truth test.
Assert that no stores were deleted.
Assert that a file was added to a store matching a given truth test.
Assert that a file was not added to a store matching a given truth test.
Assert that a file was removed from a store matching a given truth test.
Assert that a file was not removed from a store matching a given truth test.
Get a callback for matching store and file IDs.
Determine if the given file matches the expected file ID.
Determine if store operations are faked.
Get the fake store gateway.
Details
at line 51
FakeStoreGateway
fakeStores(Closure|array $responses = [])
Fake store operations.
On the shared manager, the fake gateway affects every request.
at line 62
InteractsWithFakeStores
recordStoreCreation(string $name, string|null $description = null, Collection|null $fileIds = null, DateInterval|null $expiresWhenIdleFor = null)
Record a store creation.
Recorded creations remain on the worker-shared manager.
at line 84
InteractsWithFakeStores
recordStoreDeletion(string $storeId)
Record a store deletion.
Recorded deletions remain on the worker-shared manager.
at line 97
InteractsWithFakeStores
recordFileAddition(string $storeId, string $fileId, StorableFile|UploadedFile|HasProviderId|string $file)
Record a file addition to a store.
Recorded additions remain on the worker-shared manager.
at line 117
InteractsWithFakeStores
recordFileRemoval(string $storeId, string $fileId)
Record a file removal from a store.
Recorded removals remain on the worker-shared manager.
at line 131
InteractsWithFakeStores
assertStoreCreated(Closure|string $callback)
Assert that a store was created matching a given truth test.
at line 154
InteractsWithFakeStores
assertStoreNotCreated(Closure|string $callback)
Assert that a store was not created matching a given truth test.
at line 177
InteractsWithFakeStores
assertNoStoresCreated()
Assert that no stores were created.
at line 190
InteractsWithFakeStores
assertStoreDeleted(Closure|string $callback)
Assert that a store was deleted matching a given truth test.
at line 208
InteractsWithFakeStores
assertStoreNotDeleted(Closure|string $callback)
Assert that a store was not deleted matching a given truth test.
at line 226
InteractsWithFakeStores
assertNoStoresDeleted()
Assert that no stores were deleted.
at line 239
InteractsWithFakeStores
assertFileAddedToStore(Closure|string $storeId, string|null $fileId = null)
Assert that a file was added to a store matching a given truth test.
at line 254
InteractsWithFakeStores
assertFileNotAddedToStore(Closure|string $storeId, string|null $fileId = null)
Assert that a file was not added to a store matching a given truth test.
at line 269
InteractsWithFakeStores
assertFileRemovedFromStore(Closure|string $storeId, string|null $fileId = null)
Assert that a file was removed from a store matching a given truth test.
at line 284
InteractsWithFakeStores
assertFileNotRemovedFromStore(Closure|string $storeId, string|null $fileId = null)
Assert that a file was not removed from a store matching a given truth test.
at line 299
protected Closure
fileMatchingCallback(Closure|string $storeId, string|null $fileId)
Get a callback for matching store and file IDs.
at line 312
protected bool
fileIdMatches(StorableFile|UploadedFile|HasProviderId|string $file, string|null $expectedFileId)
Determine if the given file matches the expected file ID.
at line 328
bool
storesAreFaked()
Determine if store operations are faked.
at line 336
FakeStoreGateway|null
fakeStoreGateway()
Get the fake store gateway.