@@ -29,6 +29,7 @@ public function testCreatesSpansFor(): void
29
29
Storage::assertExists ('foo ' , 'bar ' );
30
30
Storage::delete ('foo ' );
31
31
Storage::delete (['foo ' , 'bar ' ]);
32
+ Storage::files ();
32
33
33
34
$ spans = $ transaction ->getSpanRecorder ()->getSpans ();
34
35
@@ -62,6 +63,12 @@ public function testCreatesSpansFor(): void
62
63
$ this ->assertSame ('file.delete ' , $ span ->getOp ());
63
64
$ this ->assertSame ('2 paths ' , $ span ->getDescription ());
64
65
$ this ->assertSame (['paths ' => ['foo ' , 'bar ' ], 'disk ' => 'local ' , 'driver ' => 'local ' ], $ span ->getData ());
66
+
67
+ $ this ->assertArrayHasKey (6 , $ spans );
68
+ $ span = $ spans [6 ];
69
+ $ this ->assertSame ('file.files ' , $ span ->getOp ());
70
+ $ this ->assertNull ($ span ->getDescription ());
71
+ $ this ->assertSame (['directory ' => null , 'recursive ' => false , 'disk ' => 'local ' , 'driver ' => 'local ' ], $ span ->getData ());
65
72
}
66
73
67
74
public function testDoesntCreateSpansWhenDisabled (): void
@@ -99,6 +106,7 @@ public function testCreatesBreadcrumbsFor(): void
99
106
Storage::assertExists ('foo ' , 'bar ' );
100
107
Storage::delete ('foo ' );
101
108
Storage::delete (['foo ' , 'bar ' ]);
109
+ Storage::files ();
102
110
103
111
$ breadcrumbs = $ this ->getCurrentBreadcrumbs ();
104
112
@@ -132,6 +140,12 @@ public function testCreatesBreadcrumbsFor(): void
132
140
$ this ->assertSame ('file.delete ' , $ span ->getCategory ());
133
141
$ this ->assertSame ('2 paths ' , $ span ->getMessage ());
134
142
$ this ->assertSame (['paths ' => ['foo ' , 'bar ' ], 'disk ' => 'local ' , 'driver ' => 'local ' ], $ span ->getMetadata ());
143
+
144
+ $ this ->assertArrayHasKey (5 , $ breadcrumbs );
145
+ $ span = $ breadcrumbs [5 ];
146
+ $ this ->assertSame ('file.files ' , $ span ->getCategory ());
147
+ $ this ->assertNull ($ span ->getMessage ());
148
+ $ this ->assertSame (['directory ' => null , 'recursive ' => false , 'disk ' => 'local ' , 'driver ' => 'local ' ], $ span ->getMetadata ());
135
149
}
136
150
137
151
public function testDoesntCreateBreadcrumbsWhenDisabled (): void
0 commit comments