-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
631: Changes related to the next Meilisearch release (v1.8.0) r=curquiza a=meili-bot Related to this issue: meilisearch/integration-guides#299 This PR: - gathers the changes related to the next Meilisearch release (v1.8.0) so that this package is ready when the official release is out. - should pass the tests against the [latest pre-release of Meilisearch](https://github.com/meilisearch/meilisearch/releases). - might eventually contain test failures until the Meilisearch v1.8.0 is out.⚠️ This PR should NOT be merged until the next release of Meilisearch (v1.8.0) is out. _This PR is auto-generated for the [pre-release week](https://github.com/meilisearch/integration-guides/blob/main/resources/pre-release-week.md) purpose._ Co-authored-by: meili-bot <[email protected]> Co-authored-by: Clémentine U. - curqui <[email protected]> Co-authored-by: curquiza <[email protected]> Co-authored-by: Bruno Casali <[email protected]> Co-authored-by: Clémentine <[email protected]>
- Loading branch information
Showing
6 changed files
with
92 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Tests\Settings; | ||
|
||
use Meilisearch\Endpoints\Indexes; | ||
use Tests\TestCase; | ||
|
||
final class SearchCutoffMsTest extends TestCase | ||
{ | ||
private Indexes $index; | ||
|
||
protected function setUp(): void | ||
{ | ||
parent::setUp(); | ||
$this->index = $this->createEmptyIndex($this->safeIndexName()); | ||
} | ||
|
||
public function testGetDefaultSearchCutoffMs(): void | ||
{ | ||
$default = $this->index->getSearchCutoffMs(); | ||
|
||
self::assertNull($default); | ||
} | ||
|
||
public function testUpdateSearchCutoffMs(): void | ||
{ | ||
$promise = $this->index->updateSearchCutoffMs(50); | ||
$this->assertIsValidPromise($promise); | ||
$this->index->waitForTask($promise['taskUid']); | ||
|
||
self::assertSame(50, $this->index->getSearchCutoffMs()); | ||
} | ||
|
||
public function testResetSearchCutoffMs(): void | ||
{ | ||
$promise = $this->index->updateSearchCutoffMs(50); | ||
$this->assertIsValidPromise($promise); | ||
$this->index->waitForTask($promise['taskUid']); | ||
|
||
$promise = $this->index->resetSearchCutoffMs(); | ||
|
||
$this->assertIsValidPromise($promise); | ||
$this->index->waitForTask($promise['taskUid']); | ||
|
||
self::assertNull($this->index->getSearchCutoffMs()); | ||
} | ||
} |