mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-08-07 23:03:00 +03:00
Sorting: Renamed sort set to sort rule
Renamed based on feedback from Tim and Script on Discord. Also fixed flaky test
This commit is contained in:
@@ -27,7 +27,7 @@ class BookFactory extends Factory
|
||||
'slug' => Str::random(10),
|
||||
'description' => $description,
|
||||
'description_html' => '<p>' . e($description) . '</p>',
|
||||
'sort_set_id' => null,
|
||||
'sort_rule_id' => null,
|
||||
'default_template_id' => null,
|
||||
];
|
||||
}
|
||||
|
@@ -2,25 +2,25 @@
|
||||
|
||||
namespace Database\Factories\Sorting;
|
||||
|
||||
use BookStack\Sorting\SortSet;
|
||||
use BookStack\Sorting\SortSetOperation;
|
||||
use BookStack\Sorting\SortRule;
|
||||
use BookStack\Sorting\SortRuleOperation;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class SortSetFactory extends Factory
|
||||
class SortRuleFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = SortSet::class;
|
||||
protected $model = SortRule::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
$cases = SortSetOperation::cases();
|
||||
$cases = SortRuleOperation::cases();
|
||||
$op = $cases[array_rand($cases)];
|
||||
return [
|
||||
'name' => $op->name . ' Sort',
|
Reference in New Issue
Block a user