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
2222 }
2323
2424 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
2535 {
2636 $ this ->container ()->afterResolving (FilesystemManager::class, function (FilesystemManager $ filesystemManager ): void {
2737 $ filesystemManager ->extend (
Original file line number Diff line number Diff line change @@ -161,4 +161,18 @@ public function testDoesntCreateBreadcrumbsWhenDisabled(): void
161161
162162 $ this ->assertCount (0 , $ this ->getCurrentBreadcrumbs ());
163163 }
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+ }
164178}
You can’t perform that action at this time.
0 commit comments