- Add proper Tests\ namespace to all test classes in tests/Feature and tests/Unit - Split RemainingModelsTest.php into separate files (PSR-4 compliance) - Create missing factories: MetaFactory, RemoteEmailFactory - Add HasFactory trait to RemoteEmail model - Add missing ReflectionClass imports to test files - Fix mass assignment issues in Meta and RemoteEmail models - Override database connection for RemoteEmail in testing environment - Fix DateTime comparison precision issues in tests
26 lines
761 B
PHP
26 lines
761 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\RemoteEmail;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
class RemoteEmailFactory extends Factory
|
|
{
|
|
protected $model = RemoteEmail::class;
|
|
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'message_id' => $this->faker->uuid(),
|
|
'subject' => $this->faker->sentence(),
|
|
'from_name' => $this->faker->name(),
|
|
'from_email' => $this->faker->email(),
|
|
'to' => [$this->faker->email()],
|
|
'body_html' => '<p>' . $this->faker->paragraph() . '</p>',
|
|
'body_text' => $this->faker->paragraph(),
|
|
'is_seen' => $this->faker->boolean(),
|
|
'timestamp' => $this->faker->dateTime(),
|
|
];
|
|
}
|
|
} |