diff --git a/.code-samples.meilisearch.yaml b/.code-samples.meilisearch.yaml index e57b01b9..dba81aca 100644 --- a/.code-samples.meilisearch.yaml +++ b/.code-samples.meilisearch.yaml @@ -473,8 +473,6 @@ faceted_search_walkthrough_filter_1: |- $client->index('movies')->search('thriller', ['filter' => [['genres = Horror', 'genres = Mystery'], 'director = "Jordan Peele"']]); post_dump_1: |- $client->createDump(); -get_dump_status_1: |- - $client->getDumpStatus('20201101-110357260'); phrase_search_1: |- $client->index('movies')->search('"african american" horror'); sorting_guide_update_sortable_attributes_1: |- diff --git a/src/Endpoints/Delegates/HandlesDumps.php b/src/Endpoints/Delegates/HandlesDumps.php index c8bf89f3..922ce8e4 100644 --- a/src/Endpoints/Delegates/HandlesDumps.php +++ b/src/Endpoints/Delegates/HandlesDumps.php @@ -10,9 +10,4 @@ public function createDump(): array { return $this->dumps->create(); } - - public function getDumpStatus(string $uid): array - { - return $this->dumps->status($uid); - } } diff --git a/src/Endpoints/Dumps.php b/src/Endpoints/Dumps.php index b56ca070..be98d53a 100644 --- a/src/Endpoints/Dumps.php +++ b/src/Endpoints/Dumps.php @@ -14,9 +14,4 @@ public function create(): array { return $this->http->post(self::PATH); } - - public function status(string $uid): array - { - return $this->http->get(self::PATH.'/'.$uid.'/status'); - } } diff --git a/tests/Endpoints/DumpTest.php b/tests/Endpoints/DumpTest.php index 757a31ba..95c49e30 100644 --- a/tests/Endpoints/DumpTest.php +++ b/tests/Endpoints/DumpTest.php @@ -9,24 +9,12 @@ final class DumpTest extends TestCase { - public function testCreateDumpAndGetStatus(): void + public function testCreateDump(): void { - $dump = $this->client->createDump(); + $expectedKeys = ['taskUid','indexUid', 'status', 'type', 'enqueuedAt']; - $this->assertArrayHasKey('uid', $dump); - $this->assertArrayHasKey('status', $dump); - $this->assertEquals('in_progress', $dump['status']); + $task = $this->client->createDump(); - $dump = $this->client->getDumpStatus($dump['uid']); - - $this->assertArrayHasKey('uid', $dump); - $this->assertArrayHasKey('status', $dump); - } - - public function testDumpNotFound(): void - { - $this->expectException(ApiException::class); - - $this->client->getDumpStatus('not-found'); + $this->assertEquals($expectedKeys, \array_keys($task)); } }