Skip to content

Commit d37bbe8

Browse files
fixed dictionary test
1 parent c08f5ac commit d37bbe8

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

tests/packstream/v1/UnpackerTest.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -208,14 +208,7 @@ public function testDictionary(string $query, int $size, AProtocol $protocol)
208208
public function dictionaryProvider(): \Generator
209209
{
210210
foreach ([0, 10, 200, 20000, 70000] as $size) {
211-
$str = '';
212-
if ($size > 0) {
213-
foreach (range(1, $size) as $i) {
214-
$str .= 'n' . $i . ':' . $i . ',';
215-
}
216-
}
217-
218-
yield 'dictionary size: ' . $size => ['RETURN {' . rtrim($str, ',') . '} AS a', $size];
211+
yield 'dictionary size: ' . $size => ['RETURN apoc.map.fromLists(toStringList(range(1, ' . $size . ')), range(1, ' . $size . '))', $size];
219212
}
220213
}
221214

0 commit comments

Comments
 (0)