Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
babenkoivan committed Jun 22, 2023
1 parent 7f4a87e commit bcf60d0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
7 changes: 6 additions & 1 deletion phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,15 @@ parameters:
path: src/Decorators/SearchResult.php

-
message: "#^Cannot call method searchableAs\\(\\) on mixed\\.$#"
message: "#^Cannot call method searchableAs\\(\\) on Illuminate\\\\Database\\\\Eloquent\\\\Model\\|null\\.$#"
count: 2
path: src/Engine.php

-
message: "#^Method Elastic\\\\ScoutDriverPlus\\\\Factories\\\\ModelFactory\\:\\:makeFromIndexNameAndDocumentIds\\(\\) should return Illuminate\\\\Database\\\\Eloquent\\\\Collection but returns array\\<Illuminate\\\\Database\\\\Eloquent\\\\Builder\\>\\|Illuminate\\\\Database\\\\Eloquent\\\\Collection\\.$#"
count: 1
path: src/Factories/ModelFactory.php

-
message: "#^Cannot call method makeFromModels\\(\\) on mixed\\.$#"
count: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function test_parameters_can_be_transformed_to_flat_array(): void
$parameters = new ParameterCollection([
'fields' => ['title', 'year'],
'query' => 2020,
'type' => '',
'type' => null,
]);

$transformer = new FlatArrayTransformer();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ public function test_parameters_can_be_transformed_to_grouped_array(): void
'field' => 'title',
'query' => 'The Best Book',
'operator' => 'AND',
'analyzer' => '',
'lenient' => null,
]);

Expand Down

0 comments on commit bcf60d0

Please sign in to comment.