InteractsWithFakeFiles
trait InteractsWithFakeFiles
Properties
| protected FakeFileGateway|null | $fakeFileGateway | The fake file gateway instance. |
|
| protected array | $recordedFileUploads | All of the recorded file uploads. |
|
| protected array | $recordedFileDeletions | All of the recorded file deletions. |
Methods
Record a file deletion.
Assert that a file was not uploaded matching a given truth test.
Assert that no files were uploaded.
Assert that a file was deleted matching a given truth test.
Assert that a file was not deleted matching a given truth test.
Assert that no files were deleted.
Determine if file operations are faked.
Get the fake file gateway.
Details
at line 36
FakeFileGateway
fakeFiles(Closure|array $responses = [])
Fake file operations.
On the shared manager, the fake gateway affects every request.
at line 47
InteractsWithFakeFiles
recordFileUpload(StorableFile $file)
Record a file upload.
Recorded uploads remain on the worker-shared manager.
at line 62
InteractsWithFakeFiles
recordFileDeletion(string $fileId)
Record a file deletion.
Recorded deletions remain on the worker-shared manager.
at line 73
InteractsWithFakeFiles
assertFileUploaded(Closure $callback)
Assert that a file was uploaded matching a given truth test.
at line 86
InteractsWithFakeFiles
assertFileNotUploaded(Closure $callback)
Assert that a file was not uploaded matching a given truth test.
at line 99
InteractsWithFakeFiles
assertNoFilesUploaded()
Assert that no files were uploaded.
at line 112
InteractsWithFakeFiles
assertFileDeleted(Closure|string $callback)
Assert that a file was deleted matching a given truth test.
at line 130
InteractsWithFakeFiles
assertFileNotDeleted(Closure|string $callback)
Assert that a file was not deleted matching a given truth test.
at line 148
InteractsWithFakeFiles
assertNoFilesDeleted()
Assert that no files were deleted.
at line 163
bool
filesAreFaked()
Determine if file operations are faked.
at line 171
FakeFileGateway|null
fakeFileGateway()
Get the fake file gateway.