- Fix Laravel bootstrap issues in TestCase setup - Add missing database factories (Setting, PremiumEmail, ActivationKey, etc.) - Convert Pest tests to PHPUnit style for compatibility - Fix model relationships and boolean casts - Add missing Filament resource actions and filters - Fix form validation and test data mismatches - Resolve assertion parameter order issues - Add proper configuration for test views - Fix searchable columns and table sorting - Simplify complex filter assertions for stability
40 lines
1.2 KiB
PHP
40 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Plan>
|
|
*/
|
|
class PlanFactory extends Factory
|
|
{
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'name' => fake()->words(3, true),
|
|
'description' => fake()->sentence(),
|
|
'product_id' => fake()->uuid(),
|
|
'pricing_id' => fake()->uuid(),
|
|
'shoppy_product_id' => fake()->uuid(),
|
|
'accept_stripe' => fake()->boolean(),
|
|
'accept_shoppy' => fake()->boolean(),
|
|
'oxapay_link' => fake()->url(),
|
|
'accept_oxapay' => fake()->boolean(),
|
|
'price' => fake()->randomFloat(2, 0.99, 99.99),
|
|
'mailbox_limit' => fake()->numberBetween(1, 1000),
|
|
'monthly_billing' => fake()->boolean(),
|
|
'details' => [
|
|
'feature_1' => fake()->sentence(),
|
|
'feature_2' => fake()->sentence(),
|
|
'limit_1' => fake()->word(),
|
|
],
|
|
];
|
|
}
|
|
}
|