Skip to content

Commit 28d1968

Browse files
Update src/Instrumentation/Laravel/tests/Integration/LaravelInstrumentationTest.php
Co-authored-by: Chris Lightfoot-Wild <[email protected]>
1 parent 6de0be4 commit 28d1968

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

src/Instrumentation/Laravel/tests/Integration/LaravelInstrumentationTest.php

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -87,16 +87,10 @@ public function test_cache_log_db(): void
8787
public function test_eloquent_operations(): void
8888
{
8989
/** @var class-string<\Illuminate\Database\Eloquent\Model> */
90-
$modelClass = eval('
91-
if (!class_exists("TestModel")) {
92-
class TestModel extends \Illuminate\Database\Eloquent\Model
93-
{
94-
protected $table = "test_models";
95-
protected $fillable = ["name"];
96-
}
97-
}
98-
return TestModel::class;
99-
');
90+
$model = new class() extends \Illuminate\Database\Eloquent\Model {
91+
protected $table = 'test_models';
92+
protected $fillable = ['name'];
93+
};
10094

10195
// Assert storage is empty before interacting with the database
10296
$this->assertCount(0, $this->storage);

0 commit comments

Comments
 (0)