@@ -92,10 +92,12 @@ public function testgetIndexes(): void
92
92
{
93
93
$ booksIndex1 = $ this ->safeIndexName ('books-1 ' );
94
94
$ booksIndex2 = $ this ->safeIndexName ('books-2 ' );
95
- $ response = $ this ->client ->createIndex ($ booksIndex1 );
96
- $ this ->client ->waitForTask ($ response ['taskUid ' ]);
97
- $ response = $ this ->client ->createIndex ($ booksIndex2 );
98
- $ this ->client ->waitForTask ($ response ['taskUid ' ]);
95
+
96
+ $ task = $ this ->client ->createIndex ($ booksIndex1 );
97
+ $ this ->client ->waitForTask ($ task ->getTaskUid ());
98
+
99
+ $ task = $ this ->client ->createIndex ($ booksIndex2 );
100
+ $ this ->client ->waitForTask ($ task ->getTaskUid ());
99
101
100
102
$ indexes = $ this ->client ->getIndexes ();
101
103
@@ -116,9 +118,10 @@ public function testUpdateIndex(): void
116
118
$ indexName = $ this ->safeIndexName ('books-1 ' );
117
119
$ this ->createEmptyIndex ($ indexName );
118
120
119
- $ response = $ this ->client ->updateIndex ($ indexName , ['primaryKey ' => 'id ' ]);
120
- $ this ->client ->waitForTask ($ response ['taskUid ' ]);
121
- $ index = $ this ->client ->getIndex ($ response ['indexUid ' ]);
121
+ $ task = $ this ->client ->updateIndex ($ indexName , ['primaryKey ' => 'id ' ]);
122
+ $ this ->client ->waitForTask ($ task ->getTaskUid ());
123
+
124
+ $ index = $ this ->client ->getIndex ($ task ->getIndexUid ());
122
125
123
126
self ::assertSame ('id ' , $ index ->getPrimaryKey ());
124
127
self ::assertSame ($ indexName , $ index ->getUid ());
@@ -131,8 +134,8 @@ public function testDeleteIndex(): void
131
134
$ response = $ this ->client ->getIndexes ();
132
135
self ::assertCount (1 , $ response );
133
136
134
- $ response = $ this ->client ->deleteIndex ('index ' );
135
- $ this ->client ->waitForTask ($ response [ ' taskUid ' ] );
137
+ $ task = $ this ->client ->deleteIndex ('index ' );
138
+ $ this ->client ->waitForTask ($ task -> getTaskUid () );
136
139
137
140
$ this ->expectException (ApiException::class);
138
141
$ index = $ this ->client ->getIndex ('index ' );
0 commit comments