Skip to content

Commit 4fa33f5

Browse files
committed
added proper cleanup so test can be run repeatedly
1 parent 1f29a48 commit 4fa33f5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/DocumentBasicTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ public function setUp()
2727
{
2828
$this->connection = getConnection();
2929
$this->collectionHandler = new CollectionHandler($this->connection);
30+
31+
try {
32+
$this->collectionHandler->drop('ArangoDB_PHP_TestSuite_TestCollection_01');
33+
} catch (\Exception $e) {
34+
// don't bother us, if it's already deleted.
35+
}
36+
3037
$this->collection = new Collection();
3138
$this->collection->setName('ArangoDB_PHP_TestSuite_TestCollection_01');
3239
$this->collectionHandler->create($this->collection);

0 commit comments

Comments
 (0)