initial commit
This commit is contained in:
24
tests/unit/Laravel5/factories/TuneSettingFactory.php
Normal file
24
tests/unit/Laravel5/factories/TuneSettingFactory.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
|
||||
$factory->define(\XaiCorp\AbcParser\Models\Laravel5\TuneSetting::class, function (Faker\Generator $faker) {
|
||||
return [
|
||||
'tune_id' => function () {
|
||||
return factory(\XaiCorp\AbcParser\Models\Laravel5\Tune::class)->create()->id;
|
||||
},
|
||||
'meter' => 'C',
|
||||
'keysig' => '6/8',
|
||||
];
|
||||
});
|
||||
|
||||
$factory->define(\XaiCorp\AbcParser\Models\Laravel5\TuneSettingAttribute::class, function (Faker\Generator $faker) {
|
||||
$types = \XaiCorp\AbcParser\Models\Laravel5\TuneSettingAttribute::getTypes();
|
||||
return [
|
||||
'setting_id' => function () {
|
||||
return factory(\XaiCorp\AbcParser\Models\Laravel5\TuneSetting::class)->create()->id;
|
||||
},
|
||||
'type' => $types[random_int(0, count($types)-1)],
|
||||
'string' => $faker->words(3, true),
|
||||
'ordering' => $faker->numberBetween(1, 5),
|
||||
];
|
||||
});
|
||||
Reference in New Issue
Block a user