1
0
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:
Dan Brown
2025-02-11 14:36:25 +00:00
parent a208c46b62
commit b9306a9029
30 changed files with 232 additions and 224 deletions

View File

@@ -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',