Upgraded testing to Laravel 8 - disabled most tests pending code optimisation
This commit is contained in:
46
database/factories/SiteFactory.php
Normal file
46
database/factories/SiteFactory.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use App\Models\{Country,Currency,Language,Site};
|
||||
|
||||
class SiteFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = Site::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
// Create Dependencies - should be loaded by seeding.
|
||||
$co = Country::findOrFail(61);
|
||||
$lo = Language::findOrFail(1);
|
||||
$cyo = Currency::findOrFail(6);
|
||||
|
||||
return [
|
||||
'id' => $this->faker->numberBetween(255,65535),
|
||||
// date_orig
|
||||
'active' => TRUE,
|
||||
'country_id' => $co->id,
|
||||
'language_id' => $lo->id,
|
||||
'currency_id' => $cyo->id,
|
||||
// 'url'', // Needs to be passed in
|
||||
// login_expire,
|
||||
// time_format,
|
||||
// date_format,
|
||||
// decimal_place,
|
||||
// module_config,
|
||||
// site_details,
|
||||
// admin_date,
|
||||
];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user