diff --git a/tests/Controllers/RepositoryFilterControllerTest.php b/tests/Controllers/RepositoryFilterControllerTest.php index 68e26370..a0f63cd7 100644 --- a/tests/Controllers/RepositoryFilterControllerTest.php +++ b/tests/Controllers/RepositoryFilterControllerTest.php @@ -36,15 +36,15 @@ public function test_available_filters_contains_matches_sortables_searches(): vo ->assertJson( fn (AssertableJson $json) => $json ->where('data.0.rules.is_active', 'bool') - ->where('data.4.type', 'text') - ->where('data.4.column', 'title') - ->where('data.5.type', 'value') + ->where('data.5.type', 'text') ->where('data.5.column', 'title') ->where('data.6.type', 'value') - ->where('data.6.column', 'id') + ->where('data.6.column', 'title') + ->where('data.7.type', 'value') + ->where('data.7.column', 'id') ->etc() ) - ->assertJsonCount(8, 'data'); + ->assertJsonCount(9, 'data'); } public function test_available_filters_returns_only_matches_sortables_searches(): void diff --git a/tests/Fixtures/Post/ValueFilter.php b/tests/Fixtures/Post/ValueFilter.php index d815163d..53f94725 100644 --- a/tests/Fixtures/Post/ValueFilter.php +++ b/tests/Fixtures/Post/ValueFilter.php @@ -10,6 +10,8 @@ class ValueFilter extends AdvancedFilter { + public ?string $column = 'title'; + public function filter(RestifyRequest $request, Builder|Relation $query, $value) { $operator = $this->rest('operator');