Skip to content

Commit 3ac6d32

Browse files
removed apoc functions which are not available in v5
1 parent 4e462fc commit 3ac6d32

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

tests/PackStream/v1/UnpackerTest.php

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -190,17 +190,6 @@ public function listProvider(): \Generator
190190
*/
191191
public function testDictionary(string $query, int $size, AProtocol $protocol)
192192
{
193-
$apocRequest = iterator_to_array(
194-
$protocol
195-
->run('SHOW PROCEDURES YIELD name WHERE name STARTS WITH "apoc." RETURN count(*) > 0 AS apoc')
196-
->pull()
197-
->getResponses(),
198-
false
199-
);
200-
if (!$apocRequest[1]->getContent()[0]) {
201-
$this->markTestSkipped('Neo4j not running with apoc');
202-
}
203-
204193
$gen = $protocol
205194
->run($query, [], ['mode' => 'r'])
206195
->pull()
@@ -219,7 +208,14 @@ public function testDictionary(string $query, int $size, AProtocol $protocol)
219208
public function dictionaryProvider(): \Generator
220209
{
221210
foreach ([0, 10, 200, 20000, 70000] as $size) {
222-
yield 'dictionary size: ' . $size => ['RETURN apoc.map.fromLists(apoc.convert.toStringList(range(1, ' . $size . ')), range(1, ' . $size . ')) AS a', $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];
223219
}
224220
}
225221

0 commit comments

Comments
 (0)