@@ -81,8 +81,15 @@ public function testCreateAndDeleteCollectionPre1_2()
81
81
$ connection = $ this ->connection ;
82
82
$ collection = new Collection ();
83
83
$ collectionHandler = new CollectionHandler ($ connection );
84
-
84
+
85
85
$ name = 'ArangoDB_PHP_TestSuite_TestCollection_01 ' ;
86
+
87
+ try {
88
+ $ collectionHandler ->drop ($ name );
89
+ } catch (Exception $ e ) {
90
+ //Silence the exception
91
+ }
92
+
86
93
$ collection ->setName ($ name );
87
94
$ response = $ collectionHandler ->add ($ collection );
88
95
@@ -109,8 +116,15 @@ public function testCreateCollectionWithKeyOptionsAndVerifyProperties()
109
116
$ connection = $ this ->connection ;
110
117
$ collection = new Collection ();
111
118
$ collectionHandler = new CollectionHandler ($ connection );
112
-
119
+
113
120
$ name = 'ArangoDB_PHP_TestSuite_TestCollection_01 ' ;
121
+
122
+ try {
123
+ $ collectionHandler ->drop ($ name );
124
+ } catch (Exception $ e ) {
125
+ //Silence the exception
126
+ }
127
+
114
128
$ collection ->setName ($ name );
115
129
$ collection ->setKeyOptions (
116
130
array ("type " => "autoincrement " , "allowUserKeys " => false , "increment " => 5 , "offset " => 10 )
@@ -153,8 +167,15 @@ public function testCreateAndDeleteCollection()
153
167
$ connection = $ this ->connection ;
154
168
$ collection = new Collection ();
155
169
$ collectionHandler = new CollectionHandler ($ connection );
156
-
170
+
157
171
$ name = 'ArangoDB_PHP_TestSuite_TestCollection_01 ' ;
172
+
173
+ try {
174
+ $ collectionHandler ->drop ($ name );
175
+ } catch (Exception $ e ) {
176
+ //Silence the exception
177
+ }
178
+
158
179
$ collection ->setName ($ name );
159
180
$ collectionHandler ->add ($ collection );
160
181
@@ -180,8 +201,15 @@ public function testCreateAndDeleteEdgeCollection()
180
201
$ connection = $ this ->connection ;
181
202
$ collection = new Collection ();
182
203
$ collectionHandler = new CollectionHandler ($ connection );
183
-
204
+
184
205
$ name = 'ArangoDB_PHP_TestSuite_TestCollection_02 ' ;
206
+
207
+ try {
208
+ $ collectionHandler ->drop ($ name );
209
+ } catch (Exception $ e ) {
210
+ //Silence the exception
211
+ }
212
+
185
213
$ collection ->setName ($ name );
186
214
$ collection ->setType (3 );
187
215
$ collectionHandler ->add ($ collection );
@@ -209,6 +237,13 @@ public function testCreateAndDeleteEdgeCollectionWithoutCreatingObject()
209
237
$ collectionHandler = new CollectionHandler ($ connection );
210
238
211
239
$ name = 'ArangoDB_PHP_TestSuite_TestCollection_02 ' ;
240
+
241
+ try {
242
+ $ collectionHandler ->drop ($ name );
243
+ } catch (Exception $ e ) {
244
+ //Silence the exception
245
+ }
246
+
212
247
$ options = array ('type ' => 3 );
213
248
$ collectionHandler ->create ($ name , $ options );
214
249
@@ -235,6 +270,13 @@ public function testCreateAndDeleteVolatileCollectionWithoutCreatingObject()
235
270
$ collectionHandler = new CollectionHandler ($ connection );
236
271
237
272
$ name = 'ArangoDB_PHP_TestSuite_TestCollection_02 ' ;
273
+
274
+ try {
275
+ $ collectionHandler ->drop ($ name );
276
+ } catch (Exception $ e ) {
277
+ //Silence the exception
278
+ }
279
+
238
280
$ options = array ('isVolatile ' => true );
239
281
$ collectionHandler ->create ($ name , $ options );
240
282
$ resultingCollection = $ collectionHandler ->get ($ name );
@@ -260,6 +302,13 @@ public function testCreateAndDeleteSystemCollectionWithoutCreatingObject()
260
302
$ collectionHandler = new CollectionHandler ($ connection );
261
303
262
304
$ name = 'ArangoDB_PHP_TestSuite_TestCollection_02 ' ;
305
+
306
+ try {
307
+ $ collectionHandler ->drop ($ name );
308
+ } catch (Exception $ e ) {
309
+ //Silence the exception
310
+ }
311
+
263
312
$ options = array ('isSystem ' => true , 'waitForSync ' => true );
264
313
$ collectionHandler ->create ($ name , $ options );
265
314
@@ -494,7 +543,6 @@ public function testGetIndex()
494
543
495
544
public function tearDown ()
496
545
{
497
-
498
546
try {
499
547
$ this ->collectionHandler ->drop ('ArangoDB_PHP_TestSuite_IndexTestCollection ' );
500
548
} catch (Exception $ e ) {
0 commit comments