fix: resolve PSR-4 autoloading and test failures
- 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
This commit is contained in:
26
database/factories/RemoteEmailFactory.php
Normal file
26
database/factories/RemoteEmailFactory.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?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(),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user