File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
src/Sentry/Laravel/Features/Storage Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,16 @@ public function isApplicable(): bool
22
22
}
23
23
24
24
public function setup (): void
25
+ {
26
+ $ this ->registerDiskDriver ();
27
+ }
28
+
29
+ public function setupInactive (): void
30
+ {
31
+ $ this ->registerDiskDriver ();
32
+ }
33
+
34
+ private function registerDiskDriver (): void
25
35
{
26
36
$ this ->container ()->afterResolving (FilesystemManager::class, function (FilesystemManager $ filesystemManager ): void {
27
37
$ filesystemManager ->extend (
Original file line number Diff line number Diff line change @@ -161,4 +161,18 @@ public function testDoesntCreateBreadcrumbsWhenDisabled(): void
161
161
162
162
$ this ->assertCount (0 , $ this ->getCurrentBreadcrumbs ());
163
163
}
164
+
165
+ public function testDriverWorksWhenDisabled (): void
166
+ {
167
+ $ this ->resetApplicationWithConfig ([
168
+ 'sentry.dsn ' => null ,
169
+ 'filesystems.disks.local.driver ' => 'sentry ' ,
170
+ 'filesystems.disks.local.sentry_disk_name ' => 'local ' ,
171
+ 'filesystems.disks.local.sentry_original_driver ' => 'local ' ,
172
+ ]);
173
+
174
+ Storage::exists ('foo ' );
175
+
176
+ $ this ->expectNotToPerformAssertions ();
177
+ }
164
178
}
You can’t perform that action at this time.
0 commit comments