- Create Database/Factories for ContentWebhookEndpoint, ContentWebhookLog, ContentItem, ContentTaxonomy, ContentBrief - Register HTML5 elements (section, article, figure, figcaption, mark) with HTMLPurifier custom definitions - Use RefreshDatabase trait in TestCase with SQLite in-memory DB - Update Pest.php to use custom Tests\TestCase Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
31 lines
909 B
PHP
31 lines
909 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Core\Mod\Content\Database\Factories;
|
|
|
|
use Core\Mod\Content\Models\ContentWebhookEndpoint;
|
|
use Core\Mod\Content\Models\ContentWebhookLog;
|
|
use Core\Tenant\Models\Workspace;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
class ContentWebhookLogFactory extends Factory
|
|
{
|
|
protected $model = ContentWebhookLog::class;
|
|
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'workspace_id' => Workspace::factory(),
|
|
'endpoint_id' => ContentWebhookEndpoint::factory(),
|
|
'event_type' => $this->faker->randomElement([
|
|
'wordpress.post_created',
|
|
'wordpress.post_updated',
|
|
'cms.content_created',
|
|
]),
|
|
'payload' => ['title' => $this->faker->sentence()],
|
|
'status' => 'pending',
|
|
'source_ip' => $this->faker->ipv4(),
|
|
];
|
|
}
|
|
}
|