Exemplo n.º 1
0
 public function testPushMultipleInTransaction()
 {
     $q = 'MATCH (n:MultiplePersonNode) DELETE n';
     $this->client->sendCypherQuery($q);
     $statements = [];
     $statement = 'CREATE (n:MultiplePersonNode {id:{myId} })';
     for ($i = 0; $i <= 2000; $i++) {
         $statements[] = ['statement' => $statement, 'parameters' => ['myId' => uniqid()]];
     }
     $this->client->sendMultiple($statements);
     $q = 'MATCH (n:MultiplePersonNode) RETURN count(n)';
     $r = $this->client->sendCypherQuery($q);
     $count = $r->getRows()['count(n)'][0];
     $this->assertEquals(2001, $count);
 }