Skip to content
This repository has been archived by the owner on May 13, 2021. It is now read-only.

Commit

Permalink
Merge pull request #66 from shokme/php8-support
Browse files Browse the repository at this point in the history
add php 8 support
  • Loading branch information
shokme authored Dec 19, 2020
2 parents 37833ef + d8063c9 commit 99301f6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,6 @@ jobs:
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
- name: Run linter
env:
PHP_CS_FIXER_IGNORE_ENV: 1
run: composer lint
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
]
},
"require": {
"php": "^7.2.5",
"php": "^7.2|^8.0",
"laravel/scout": "^8.0",
"meilisearch/meilisearch-php": "^0.15",
"http-interop/http-factory-guzzle": "^1.0"
Expand Down
20 changes: 10 additions & 10 deletions tests/MeilisearchEngineTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ protected function tearDown(): void
}

/** @test */
public function update_adds_objects_to_index()
public function updateAddsObjectsToIndex()
{
$client = m::mock(Client::class);
$client->shouldReceive('getOrCreateIndex')->with('table', ['primaryKey' => 'id'])->andReturn($index = m::mock(Indexes::class));
Expand All @@ -34,7 +34,7 @@ public function update_adds_objects_to_index()
}

/** @test */
public function delete_removes_objects_to_index()
public function deleteRemovesObjectsToIndex()
{
$client = m::mock(Client::class);
$client->shouldReceive('getIndex')->with('table')->andReturn($index = m::mock(Indexes::class));
Expand All @@ -45,7 +45,7 @@ public function delete_removes_objects_to_index()
}

/** @test */
public function search_sends_correct_parameters_to_meilisearch()
public function searchSendsCorrectParametersToMeilisearch()
{
$client = m::mock(Client::class);
$client->shouldReceive('getIndex')->with('table')->andReturn($index = m::mock(Indexes::class));
Expand All @@ -63,7 +63,7 @@ public function search_sends_correct_parameters_to_meilisearch()
}

/** @test */
public function mapIds_returns_empty_collection_if_no_hits()
public function mapIdsReturnsEmptyCollectionIfNoHits()
{
$client = m::mock(Client::class);
$engine = new MeilisearchEngine($client);
Expand All @@ -76,7 +76,7 @@ public function mapIds_returns_empty_collection_if_no_hits()
}

/** @test */
public function map_correctly_maps_results_to_models()
public function mapCorrectlyMapsResultsToModels()
{
$client = m::mock(Client::class);
$engine = new MeilisearchEngine($client);
Expand All @@ -96,7 +96,7 @@ public function map_correctly_maps_results_to_models()
}

/** @test */
public function map_method_respects_order()
public function mapMethodRespectsOrder()
{
$client = m::mock(Client::class);
$engine = new MeilisearchEngine($client);
Expand Down Expand Up @@ -131,7 +131,7 @@ public function map_method_respects_order()
}

/** @test */
public function a_model_is_indexed_with_a_custom_meilisearch_key()
public function aModelIsIndexedWithACustomMeilisearchKey()
{
$client = m::mock(Client::class);
$client->shouldReceive('getOrCreateIndex')->with('table', ['primaryKey' => 'id'])->andReturn($index = m::mock(Indexes::class));
Expand All @@ -142,7 +142,7 @@ public function a_model_is_indexed_with_a_custom_meilisearch_key()
}

/** @test */
public function flush_a_model_with_a_custom_meilisearch_key()
public function flushAModelWithACustomMeilisearchKey()
{
$client = m::mock(Client::class);
$client->shouldReceive('getIndex')->with('table')->andReturn($index = m::mock(Indexes::class));
Expand All @@ -153,7 +153,7 @@ public function flush_a_model_with_a_custom_meilisearch_key()
}

/** @test */
public function update_empty_searchable_array_does_not_add_objects_to_index()
public function updateEmptySearchableArrayDoesNotAddObjectsToIndex()
{
$client = m::mock(Client::class);
$client->shouldReceive('getOrCreateIndex')->with('table', ['primaryKey' => 'id'])->andReturn($index = m::mock(Indexes::class));
Expand All @@ -164,7 +164,7 @@ public function update_empty_searchable_array_does_not_add_objects_to_index()
}

/** @test */
public function pagination_correct_parameters()
public function paginationCorrectParameters()
{
$perPage = 5;
$page = 2;
Expand Down

0 comments on commit 99301f6

Please sign in to comment.