@@ -88,7 +88,7 @@ public function testPartIds()
88
88
89
89
for ($ i = 0 ; $ i < 10 ; ++$ i ) {
90
90
$ part = $ batch ->getPart ('doc ' . $ i );
91
- static ::assertInstanceOf (' \ArangoDBClient\ BatchPart' , $ part );
91
+ static ::assertInstanceOf (BatchPart::class , $ part );
92
92
93
93
static ::assertEquals ('doc ' . $ i , $ part ->getId ());
94
94
static ::assertEquals (202 , $ part ->getHttpCode ());
@@ -123,7 +123,7 @@ public function testProcessProcess()
123
123
$ this ->collectionHandler ->create ($ collection );
124
124
125
125
$ part = $ batch ->getPart (0 );
126
- static ::assertInstanceOf (' \ArangoDBClient\ BatchPart' , $ part );
126
+ static ::assertInstanceOf (BatchPart::class , $ part );
127
127
static ::assertEquals (202 , $ part ->getHttpCode ());
128
128
129
129
// call process once (this does not clear the batch)
@@ -149,15 +149,15 @@ public function testCreateDocumentBatch()
149
149
// not needed, but just here to test if anything goes wrong if it's called again...
150
150
$ batch ->startCapture ();
151
151
152
- static ::assertInstanceOf (' \ArangoDBClient\ Batch' , $ batch );
152
+ static ::assertInstanceOf (Batch::class , $ batch );
153
153
$ documentHandler = $ this ->documentHandler ;
154
154
155
155
$ document = Document::createFromArray (
156
156
['someAttribute ' => 'someValue ' , 'someOtherAttribute ' => 'someOtherValue ' ]
157
157
);
158
158
$ documentId = $ documentHandler ->save ($ this ->collection ->getId (), $ document );
159
159
160
- static ::assertInstanceOf (' \ArangoDBClient\ BatchPart' , $ documentId , 'Did not return a BatchPart Object! ' );
160
+ static ::assertInstanceOf (BatchPart::class , $ documentId , 'Did not return a BatchPart Object! ' );
161
161
162
162
$ batchPartId = $ documentId ->getId ();
163
163
@@ -166,7 +166,7 @@ public function testCreateDocumentBatch()
166
166
);
167
167
$ documentId = $ documentHandler ->save ($ this ->collection ->getId (), $ document );
168
168
169
- static ::assertInstanceOf (' \ArangoDBClient\ BatchPart' , $ documentId , 'Did not return a BatchPart Object! ' );
169
+ static ::assertInstanceOf (BatchPart::class , $ documentId , 'Did not return a BatchPart Object! ' );
170
170
171
171
$ batch ->process ();
172
172
@@ -186,22 +186,22 @@ public function testCreateDocumentBatchWithDefinedBatchSize()
186
186
// not needed, but just here to test if anything goes wrong if it's called again...
187
187
$ batch ->startCapture ();
188
188
189
- static ::assertInstanceOf (' \ArangoDBClient\ Batch' , $ batch );
189
+ static ::assertInstanceOf (Batch::class , $ batch );
190
190
$ documentHandler = $ this ->documentHandler ;
191
191
192
192
$ document = Document::createFromArray (
193
193
['someAttribute ' => 'someValue ' , 'someOtherAttribute ' => 'someOtherValue ' ]
194
194
);
195
195
$ documentId = $ documentHandler ->save ($ this ->collection ->getId (), $ document );
196
196
197
- static ::assertInstanceOf (' \ArangoDBClient\ BatchPart' , $ documentId , 'Did not return a BatchPart Object! ' );
197
+ static ::assertInstanceOf (BatchPart::class , $ documentId , 'Did not return a BatchPart Object! ' );
198
198
199
199
$ document = Document::createFromArray (
200
200
['someAttribute ' => 'someValue2 ' , 'someOtherAttribute ' => 'someOtherValue2 ' ]
201
201
);
202
202
$ documentId = $ documentHandler ->save ($ this ->collection ->getId (), $ document );
203
203
204
- static ::assertInstanceOf (' \ArangoDBClient\ BatchPart' , $ documentId , 'Did not return a BatchPart Object! ' );
204
+ static ::assertInstanceOf (BatchPart::class , $ documentId , 'Did not return a BatchPart Object! ' );
205
205
206
206
static ::assertEquals ($ batch ->getConnectionCaptureMode ($ this ->connection ), true );
207
207
@@ -238,15 +238,15 @@ public function testFailureWhenCreatingMoreDocumentsInBatchThanDefinedBatchSize(
238
238
// not needed, but just here to test if anything goes wrong if it's called again...
239
239
$ batch ->startCapture ();
240
240
241
- static ::assertInstanceOf (' \ArangoDBClient\ Batch' , $ batch );
241
+ static ::assertInstanceOf (Batch::class , $ batch );
242
242
$ documentHandler = $ this ->documentHandler ;
243
243
244
244
$ document = Document::createFromArray (
245
245
['someAttribute ' => 'someValue ' , 'someOtherAttribute ' => 'someOtherValue ' ]
246
246
);
247
247
$ documentId = $ documentHandler ->save ($ this ->collection ->getId (), $ document );
248
248
249
- static ::assertInstanceOf (' \ArangoDBClient\ BatchPart' , $ documentId , 'Did not return a BatchPart Object! ' );
249
+ static ::assertInstanceOf (BatchPart::class , $ documentId , 'Did not return a BatchPart Object! ' );
250
250
251
251
$ document = Document::createFromArray (
252
252
['someAttribute ' => 'someValue2 ' , 'someOtherAttribute ' => 'someOtherValue2 ' ]
@@ -257,7 +257,7 @@ public function testFailureWhenCreatingMoreDocumentsInBatchThanDefinedBatchSize(
257
257
// don't bother us, just give us the $e
258
258
}
259
259
static ::assertInstanceOf (
260
- ' RuntimeException ' ,
260
+ \ RuntimeException::class ,
261
261
$ e ,
262
262
'Exception thrown was not a RuntimeException! '
263
263
);
@@ -270,7 +270,7 @@ public function testCreateMixedBatchWithPartIds()
270
270
$ edgeCollection = $ this ->edgeCollection ;
271
271
272
272
$ batch = new Batch ($ this ->connection );
273
- static ::assertInstanceOf (' \ArangoDBClient\ Batch' , $ batch );
273
+ static ::assertInstanceOf (Batch::class , $ batch );
274
274
275
275
// Create collection
276
276
$ connection = $ this ->connection ;
@@ -311,7 +311,7 @@ public function testCreateMixedBatchWithPartIds()
311
311
312
312
static ::assertEquals ($ documentBatchPart ->getType (), 'document ' );
313
313
314
- static ::assertInstanceOf (' \ArangoDBClient\ BatchPart' , $ documentBatchPart , 'Did not return a BatchPart Object! ' );
314
+ static ::assertInstanceOf (BatchPart::class , $ documentBatchPart , 'Did not return a BatchPart Object! ' );
315
315
316
316
for ($ i = 0 ; $ i <= 10 ; ++$ i ) {
317
317
$ document = Document::createFromArray (
@@ -322,7 +322,7 @@ public function testCreateMixedBatchWithPartIds()
322
322
);
323
323
$ documentBatchPart = $ documentHandler ->save ($ resultingCollectionId , $ document );
324
324
}
325
- static ::assertInstanceOf (' \ArangoDBClient\ BatchPart' , $ documentBatchPart , 'Did not return a BatchPart Object! ' );
325
+ static ::assertInstanceOf (BatchPart::class , $ documentBatchPart , 'Did not return a BatchPart Object! ' );
326
326
327
327
$ batch ->process ();
328
328
@@ -363,7 +363,7 @@ public function testCreateMixedBatchWithPartIds()
363
363
364
364
365
365
static ::assertFalse (
366
- is_a ($ edge , ' ArangoDBClient\ HttpResponse' ),
366
+ is_a ($ edge , HttpResponse::class ),
367
367
'Edge batch creation did return an error: ' . print_r ($ edge , true )
368
368
);
369
369
static ::assertNotSame ($ edge , '' , 'Edge batch creation did return empty string: ' . print_r ($ edge , true ));
0 commit comments