Skip to content

Commit 6bf49e3

Browse files
committed
Fixed GraphBasicTest leaving some trash behind...
(This doesn't matter when testing on travis, but it messes up a local instance collection and graph-wise)
1 parent df64292 commit 6bf49e3

File tree

1 file changed

+20
-19
lines changed

1 file changed

+20
-19
lines changed

tests/GraphBasicTest.php

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ class GraphBasicTest extends
2828
{
2929
public function setUp()
3030
{
31-
$this->connection = getConnection();
31+
$this->connection = getConnection();
32+
$this->collectionHandler = new CollectionHandler($this->connection);
3233
}
3334

3435

@@ -216,21 +217,21 @@ public function testAddGetDeleteCollections()
216217

217218
static::assertSame(
218219
$this->graphHandler->getVertexCollections($this->graph), array(
219-
0 => 'ArangoDBPHPTestSuiteTestCollection04',
220-
1 => 'orphan1',
221-
2 => 'orphan2',
222-
3 => 'singleV'
220+
0 => 'ArangoDBPHPTestSuiteTestCollection04',
221+
1 => 'orphan1',
222+
2 => 'orphan2',
223+
3 => 'singleV'
223224

224-
)
225+
)
225226
);
226227
$this->graph = $this->graphHandler->deleteOrphanCollection($this->graph, 'orphan2');
227228
static::assertSame(
228229
$this->graphHandler->getVertexCollections($this->graph), array(
229-
0 => 'ArangoDBPHPTestSuiteTestCollection04',
230-
1 => 'orphan1',
231-
2 => 'singleV'
230+
0 => 'ArangoDBPHPTestSuiteTestCollection04',
231+
1 => 'orphan1',
232+
2 => 'singleV'
232233

233-
)
234+
)
234235
);
235236
$error = null;
236237
try {
@@ -282,10 +283,10 @@ public function testAddGetDeleteEdgeCollections()
282283

283284
static::assertSame(
284285
$this->graphHandler->getEdgeCollections($this->graph), array(
285-
0 => 'undirected',
286-
1 => 'undirected2'
286+
0 => 'undirected',
287+
1 => 'undirected2'
287288

288-
)
289+
)
289290
);
290291

291292
$error = null;
@@ -313,9 +314,9 @@ public function testAddGetDeleteEdgeCollections()
313314

314315
static::assertSame(
315316
$this->graphHandler->getEdgeCollections($this->graph), array(
316-
0 => 'undirected2'
317+
0 => 'undirected2'
317318

318-
)
319+
)
319320
);
320321

321322
$error = null;
@@ -370,19 +371,19 @@ public function tearDown()
370371
} catch (Exception $e) {
371372
}
372373
try {
373-
$this->graphHandler->dropGraph('orphan');
374+
$this->collectionHandler->drop('orphan');
374375
} catch (Exception $e) {
375376
}
376377
try {
377-
$this->graphHandler->dropGraph('orphan1');
378+
$this->collectionHandler->drop('orphan1');
378379
} catch (Exception $e) {
379380
}
380381
try {
381-
$this->graphHandler->dropGraph('orphan2');
382+
$this->collectionHandler->drop('orphan2');
382383
} catch (Exception $e) {
383384
}
384385
try {
385-
$this->graphHandler->dropGraph('undirected');
386+
$this->collectionHandler->drop('undirected');
386387
} catch (Exception $e) {
387388
}
388389
unset($this->graph, $this->graphHandler, $this->connection);

0 commit comments

Comments
 (0)