diff --git a/tests/Database/DatabaseEloquentModelTest.php b/tests/Database/DatabaseEloquentModelTest.php index 771d9d75cb42..7678f142d51f 100755 --- a/tests/Database/DatabaseEloquentModelTest.php +++ b/tests/Database/DatabaseEloquentModelTest.php @@ -3147,8 +3147,8 @@ public function testModelToJsonSucceedsWithPriorErrors(): void public function testFillableWithMutators() { $model = new EloquentModelWithMutators; - $model->fillable(['fullname', 'full_address']); - $model->fill(['id' => 1, 'fullname' => 'John Doe', 'full_address' => '123 Main Street, Anytown']); + $model->fillable(['full_name', 'full_address']); + $model->fill(['id' => 1, 'full_name' => 'John Doe', 'full_address' => '123 Main Street, Anytown']); $this->assertNull($model->id); $this->assertSame('John', $model->first_name); @@ -3161,7 +3161,7 @@ public function testGuardedWithMutators() { $model = new EloquentModelWithMutators; $model->guard(['id']); - $model->fill(['id' => 1, 'fullname' => 'John Doe', 'full_address' => '123 Main Street, Anytown']); + $model->fill(['id' => 1, 'full_name' => 'John Doe', 'full_address' => '123 Main Street, Anytown']); $this->assertNull($model->id); $this->assertSame('John', $model->first_name); @@ -3906,12 +3906,12 @@ class EloquentModelWithMutators extends Model 'address_line_two' => null, ]; - protected function fullname(): Attribute + protected function fullName(): Attribute { return Attribute::make( - get: fn (mixed $value, array $attributes) => $attributes['first_name'] . ' ' . $attributes['last_name'], + get: fn (mixed $value, array $attributes) => $attributes['first_name'].' '.$attributes['last_name'], set: function (string $fullName) { - [$firstName, $lastName] = explode(" ", $fullName); + [$firstName, $lastName] = explode(' ', $fullName); return [ 'first_name' => $firstName,