BookStack/database/factories/Activity/Models/CommentFactory.php
Dan Brown e9a19d5878
Comments: Added wysiwyg link selector, updated tests, removed command
- Updated existing tests with recent back-end changes, mainly to use
  HTML data.
- Removed old comment regen command that's no longer required.
2024-01-31 14:22:04 +00:00

34 lines
685 B
PHP

<?php
namespace Database\Factories\Activity\Models;
use Illuminate\Database\Eloquent\Factories\Factory;
class CommentFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = \BookStack\Activity\Models\Comment::class;
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
{
$text = $this->faker->paragraph(1);
$html = '<p>' . $text . '</p>';
return [
'html' => $html,
'text' => $text,
'parent_id' => null,
'local_id' => 1,
];
}
}