@@ -1267,17 +1267,19 @@ public function testCreateGraphAndQueryVertices()
1267
1267
$ cursor = $ this ->graphHandler ->getVertices ($ this ->graphName , $ options );
1268
1268
$ this ->assertInstanceOf ('triagens\ArangoDb\Cursor ' , $ cursor );
1269
1269
1270
- $ this ->assertTrue (count ($ cursor ->getMetadata ()["result " ]) == 1 );
1271
- $ this ->assertTrue ($ cursor ->getMetadata ()["hasMore " ] == true );
1270
+ $ m = $ cursor ->getMetadata ();
1271
+ $ this ->assertTrue (count ($ m ["result " ]) == 1 );
1272
+ $ this ->assertTrue ($ m ["hasMore " ] == true );
1272
1273
1273
1274
1274
1275
// Test options->limit
1275
1276
unset($ resultingDocument );
1276
1277
$ options = array ('limit ' => 1 );
1277
1278
$ cursor = $ this ->graphHandler ->getVertices ($ this ->graphName , $ options );
1279
+ $ m = $ cursor ->getMetadata ();
1278
1280
$ this ->assertInstanceOf ('triagens\ArangoDb\Cursor ' , $ cursor );
1279
- $ this ->assertTrue (count ($ cursor -> getMetadata () ["result " ]) == 1 );
1280
- $ this ->assertTrue ($ cursor -> getMetadata () ["hasMore " ] == false );;
1281
+ $ this ->assertTrue (count ($ m ["result " ]) == 1 );
1282
+ $ this ->assertTrue ($ m ["hasMore " ] == false );;
1281
1283
1282
1284
1283
1285
// Test options->count
@@ -1286,9 +1288,9 @@ public function testCreateGraphAndQueryVertices()
1286
1288
$ cursor = $ this ->graphHandler ->getVertices ($ this ->graphName , $ options );
1287
1289
$ this ->assertInstanceOf ('triagens\ArangoDb\Cursor ' , $ cursor );
1288
1290
1289
-
1290
- $ this ->assertTrue (count ($ cursor -> getMetadata () ["result " ]) == 4 );
1291
- $ this ->assertTrue ($ cursor -> getMetadata () ["hasMore " ] == false );
1291
+ $ m = $ cursor -> getMetadata ();
1292
+ $ this ->assertTrue (count ($ m ["result " ]) == 4 );
1293
+ $ this ->assertTrue ($ m ["hasMore " ] == false );
1292
1294
1293
1295
// Test options->properties
1294
1296
unset($ resultingDocument );
@@ -1298,8 +1300,9 @@ public function testCreateGraphAndQueryVertices()
1298
1300
1299
1301
$ cursor = $ this ->graphHandler ->getVertices ($ this ->graphName , $ options );
1300
1302
$ this ->assertInstanceOf ('triagens\ArangoDb\Cursor ' , $ cursor );
1301
- $ this ->assertTrue (count ($ cursor ->getMetadata ()["result " ]) == 1 );
1302
- $ this ->assertTrue ($ cursor ->getMetadata ()["hasMore " ] == false );;
1303
+ $ m = $ cursor ->getMetadata ();
1304
+ $ this ->assertTrue (count ($ m ["result " ]) == 1 );
1305
+ $ this ->assertTrue ($ m ["hasMore " ] == false );
1303
1306
}
1304
1307
1305
1308
@@ -1313,8 +1316,9 @@ public function testCreateGraphAndQueryEdges()
1313
1316
$ cursor = $ this ->graphHandler ->getEdges ($ this ->graphName );
1314
1317
$ this ->assertInstanceOf ('triagens\ArangoDb\Cursor ' , $ cursor );
1315
1318
$ this ->assertInstanceOf ('triagens\ArangoDb\Cursor ' , $ cursor );
1316
- $ this ->assertTrue (count ($ cursor ->getMetadata ()["result " ]) == 3 );
1317
- $ this ->assertTrue ($ cursor ->getMetadata ()["hasMore " ] == false );
1319
+ $ m = $ cursor ->getMetadata ();
1320
+ $ this ->assertTrue (count ($ m ["result " ]) == 3 );
1321
+ $ this ->assertTrue ($ m ["hasMore " ] == false );
1318
1322
1319
1323
1320
1324
// Test options->batchSize
@@ -1323,17 +1327,19 @@ public function testCreateGraphAndQueryEdges()
1323
1327
$ cursor = $ this ->graphHandler ->getEdges ($ this ->graphName , $ options );
1324
1328
$ this ->assertInstanceOf ('triagens\ArangoDb\Cursor ' , $ cursor );
1325
1329
$ this ->assertInstanceOf ('triagens\ArangoDb\Cursor ' , $ cursor );
1326
- $ this ->assertTrue (count ($ cursor ->getMetadata ()["result " ]) == 1 );
1327
- $ this ->assertTrue ($ cursor ->getMetadata ()["hasMore " ] == true );
1330
+ $ m = $ cursor ->getMetadata ();
1331
+ $ this ->assertTrue (count ($ m ["result " ]) == 1 );
1332
+ $ this ->assertTrue ($ m ["hasMore " ] == true );
1328
1333
1329
1334
// Test options->limit
1330
1335
unset($ resultingDocument );
1331
1336
$ options = array ('limit ' => 1 );
1332
1337
$ cursor = $ this ->graphHandler ->getEdges ($ this ->graphName , $ options );
1333
1338
$ this ->assertInstanceOf ('triagens\ArangoDb\Cursor ' , $ cursor );
1334
1339
$ this ->assertInstanceOf ('triagens\ArangoDb\Cursor ' , $ cursor );
1335
- $ this ->assertTrue (count ($ cursor ->getMetadata ()["result " ]) == 1 );
1336
- $ this ->assertTrue ($ cursor ->getMetadata ()["hasMore " ] == false );
1340
+ $ m = $ cursor ->getMetadata ();
1341
+ $ this ->assertTrue (count ($ m ["result " ]) == 1 );
1342
+ $ this ->assertTrue ($ m ["hasMore " ] == false );
1337
1343
1338
1344
1339
1345
// Test options->count
@@ -1342,8 +1348,9 @@ public function testCreateGraphAndQueryEdges()
1342
1348
$ cursor = $ this ->graphHandler ->getEdges ($ this ->graphName , $ options );
1343
1349
$ this ->assertInstanceOf ('triagens\ArangoDb\Cursor ' , $ cursor );
1344
1350
$ this ->assertInstanceOf ('triagens\ArangoDb\Cursor ' , $ cursor );
1345
- $ this ->assertTrue (count ($ cursor ->getMetadata ()["result " ]) == 3 );
1346
- $ this ->assertTrue ($ cursor ->getMetadata ()["hasMore " ] == false );
1351
+ $ m = $ cursor ->getMetadata ();
1352
+ $ this ->assertTrue (count ($ m ["result " ]) == 3 );
1353
+ $ this ->assertTrue ($ m ["hasMore " ] == false );
1347
1354
1348
1355
// Test options->filter
1349
1356
unset($ resultingDocument );
@@ -1353,8 +1360,9 @@ public function testCreateGraphAndQueryEdges()
1353
1360
$ cursor = $ this ->graphHandler ->getEdges ($ this ->graphName , $ options );
1354
1361
$ this ->assertInstanceOf ('triagens\ArangoDb\Cursor ' , $ cursor );
1355
1362
$ this ->assertInstanceOf ('triagens\ArangoDb\Cursor ' , $ cursor );
1356
- $ this ->assertTrue (count ($ cursor ->getMetadata ()["result " ]) == 1 );
1357
- $ this ->assertTrue ($ cursor ->getMetadata ()["hasMore " ] == false );
1363
+ $ m = $ cursor ->getMetadata ();
1364
+ $ this ->assertTrue (count ($ m ["result " ]) == 1 );
1365
+ $ this ->assertTrue ($ m ["hasMore " ] == false );
1358
1366
1359
1367
1360
1368
// Test options->properties
@@ -1366,8 +1374,9 @@ public function testCreateGraphAndQueryEdges()
1366
1374
$ cursor = $ this ->graphHandler ->getEdges ($ this ->graphName , $ options );
1367
1375
$ this ->assertInstanceOf ('triagens\ArangoDb\Cursor ' , $ cursor );
1368
1376
$ this ->assertInstanceOf ('triagens\ArangoDb\Cursor ' , $ cursor );
1369
- $ this ->assertTrue (count ($ cursor ->getMetadata ()["result " ]) == 1 );
1370
- $ this ->assertTrue ($ cursor ->getMetadata ()["hasMore " ] == false );;
1377
+ $ m = $ cursor ->getMetadata ();
1378
+ $ this ->assertTrue (count ($ m ["result " ]) == 1 );
1379
+ $ this ->assertTrue ($ m ["hasMore " ] == false );
1371
1380
}
1372
1381
1373
1382
0 commit comments