File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
src/Instrumentation/Laravel/tests/Integration/Database/Eloquent Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -128,6 +128,21 @@ public function test_perform_update(): void
128128 $ this ->assertSame ('update ' , $ span ->getAttributes ()->get ('laravel.eloquent.operation ' ));
129129 }
130130
131+ public function test_delete (): void
132+ {
133+ $ model = new TestModel ();
134+ $ model ->delete (); // no effect
135+
136+ $ spans = $ this ->filterOnlyEloquentSpans ();
137+ $ this ->assertCount (1 , $ spans );
138+
139+ $ span = $ spans [0 ];
140+ $ this ->assertSame ('OpenTelemetry\Tests\Contrib\Instrumentation\Laravel\Fixtures\Models\TestModel::delete ' , $ span ->getName ());
141+ $ this ->assertSame ('OpenTelemetry\Tests\Contrib\Instrumentation\Laravel\Fixtures\Models\TestModel ' , $ span ->getAttributes ()->get ('laravel.eloquent.model ' ));
142+ $ this ->assertSame ('test_models ' , $ span ->getAttributes ()->get ('laravel.eloquent.table ' ));
143+ $ this ->assertSame ('delete ' , $ span ->getAttributes ()->get ('laravel.eloquent.operation ' ));
144+ }
145+
131146 public function test_get_models (): void
132147 {
133148 TestModel::get ();
You can’t perform that action at this time.
0 commit comments