-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: added missing song resource factory (#606)
- Loading branch information
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Database\Factories\Pivots\Wiki; | ||
|
||
use App\Pivots\Wiki\SongResource; | ||
use Illuminate\Database\Eloquent\Factories\Factory; | ||
use Illuminate\Support\Str; | ||
|
||
/** | ||
* Class SongResourceFactory. | ||
* | ||
* @method SongResource createOne($attributes = []) | ||
* @method SongResource makeOne($attributes = []) | ||
* | ||
* @extends Factory<SongResource> | ||
*/ | ||
class SongResourceFactory extends Factory | ||
{ | ||
/** | ||
* The name of the factory's corresponding model. | ||
* | ||
* @var class-string<SongResource> | ||
*/ | ||
protected $model = SongResource::class; | ||
|
||
/** | ||
* Define the model's default state. | ||
* | ||
* @return array | ||
*/ | ||
public function definition(): array | ||
{ | ||
return [ | ||
SongResource::ATTRIBUTE_AS => Str::random(), | ||
]; | ||
} | ||
} |