Skip to content

Commit

Permalink
chore: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
djaiss committed Dec 20, 2023
1 parent b15f345 commit 20b5222
Show file tree
Hide file tree
Showing 8 changed files with 610 additions and 42 deletions.
6 changes: 3 additions & 3 deletions app/Console/Commands/FetchMetaData.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ public function handle(): void
ProcessPersonality::dispatch($name);
}

if (is_null($name->country_of_origin)) {
ProcessCountryOfOrigin::dispatch($name);
}
// if (is_null($name->country_of_origin)) {
// ProcessCountryOfOrigin::dispatch($name);
// }

if (is_null($name->celebrities)) {
ProcessCelebrities::dispatch($name);
Expand Down
2 changes: 1 addition & 1 deletion app/Http/ViewModels/Names/NameViewModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public static function details(Name $name): array
'name_day' => Str::of($name->name_day)->markdown(),
'litterature_artistics_references' => Str::of($name->litterature_artistics_references)->markdown(),
'similar_names_in_other_languages' => Str::of($name->similar_names_in_other_languages)->markdown(),
'klingon_translation' => Str::of($name->klingon_translation)->markdown(),
'klingon_translation' => null,
'total' => $name->total,
'url' => route('name.show', [
'id' => $name->id,
Expand Down
Binary file modified bun.lockb
Binary file not shown.
76 changes: 38 additions & 38 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions database/factories/NameStatisticFactory.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

namespace Database\Factories;

use App\Models\Name;
use Illuminate\Database\Eloquent\Factories\Factory;

/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\NameStatistic>
*/
class NameStatisticFactory extends Factory
{
protected static ?string $password;

/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'name_id' => Name::factory(),
'year' => fake()->year(),
'count' => fake()->numberBetween(1, 1000),
];
}
}
Loading

0 comments on commit 20b5222

Please sign in to comment.