php-content/Database/Factories/ContentTaxonomyFactory.php
Claude e7e7e5be89
Some checks are pending
CI / PHP 8.3 (push) Waiting to run
CI / PHP 8.4 (push) Waiting to run
fix: add factories, fix HtmlSanitiser HTML5 elements, fix TestCase
- 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>
2026-02-23 07:01:48 +00:00

25 lines
662 B
PHP

<?php
declare(strict_types=1);
namespace Core\Mod\Content\Database\Factories;
use Core\Mod\Content\Models\ContentTaxonomy;
use Core\Tenant\Models\Workspace;
use Illuminate\Database\Eloquent\Factories\Factory;
class ContentTaxonomyFactory extends Factory
{
protected $model = ContentTaxonomy::class;
public function definition(): array
{
return [
'workspace_id' => Workspace::factory(),
'type' => $this->faker->randomElement(['category', 'tag']),
'name' => $this->faker->word(),
'slug' => $this->faker->slug(),
'count' => $this->faker->numberBetween(0, 100),
];
}
}