File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ public function testVirtualReplicaConfig(): void
139
139
}
140
140
141
141
/**
142
- * ConfigHelper::setSorting used WriterInterface which does not update unless DB isolation is disabled
142
+ * ConfigHelper::setSorting uses WriterInterface which does not update unless DB isolation is disabled
143
143
* This provides a workaround to test using MutableScopeConfigInterface with DB isolation enabled
144
144
*/
145
145
protected function mockSortUpdate (string $ sortAttr , string $ sortDir , array $ attr ): void
@@ -201,7 +201,15 @@ public function testReplicaSync(): void
201
201
$ this ->assertArrayHasKey ('replicas ' , $ currentSettings );
202
202
$ replicas = $ currentSettings ['replicas ' ];
203
203
204
- $ this ->assertTrue (count ($ replicas ) >= count ($ sorting ));
204
+ $ this ->assertEquals (count ($ sorting ), count ($ replicas ));
205
+
206
+ foreach ($ sorting as $ sortAttr ) {
207
+ $ replicaIndexName = $ sortAttr ['name ' ];
208
+ $ needle = array_key_exists ('virtualReplica ' , $ sortAttr ) && $ sortAttr ['virtualReplica ' ]
209
+ ? "virtual( $ replicaIndexName) "
210
+ : $ replicaIndexName ;
211
+ $ this ->assertContains ($ needle , $ replicas );
212
+ }
205
213
206
214
}
207
215
You can’t perform that action at this time.
0 commit comments