Skip to content

Commit 46f3654

Browse files
committed
Fix tests, as ArangoDB >=3.1 Does not use numeric revision id's anymore and PHP 7.1 throws warnings and notices...
1 parent a8a3274 commit 46f3654

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/DocumentExtendedTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ public function testDeleteDocumentWithDeleteByIdWithRevisionAndPolicyIsError()
467467

468468
$revision = $document->getRevision();
469469
try {
470-
$documentHandler->removeById($this->collection->getId(), $documentId, $revision - 1000, ['policy' => 'error']);
470+
$documentHandler->removeById($this->collection->getId(), $documentId, '_UOarUR----', ['policy' => 'error']);
471471
} catch (ServerException $e) {
472472
static::assertTrue(true);
473473
}
@@ -493,7 +493,7 @@ public function testDeleteDocumentWithDeleteByIdWithRevisionAndPolicyIsLast()
493493

494494
$revision = $document->getRevision();
495495

496-
$response = $documentHandler->removeById($this->collection->getId(), $documentId, $revision - 1000, ['policy' => 'last']);
496+
$response = $documentHandler->removeById($this->collection->getId(), $documentId, '_UOarUR----', ['policy' => 'last']);
497497
static::assertTrue(
498498
$response,
499499
'deleteById() should return true! (because policy is "last write wins")'
@@ -537,7 +537,7 @@ public function testCreateUpdateGetAndDeleteDocumentWithRevisionCheck()
537537
// Set some new values on the attributes and include a fake revision in the _rev attribute
538538
// This should result in a failure to update
539539
$document->set('someOtherAttribute', 'someOtherValue3');
540-
$document->setRevision($resultingDocument->getRevision() - 1000);
540+
$document->setRevision('_UOarUR----');
541541
$e = null;
542542
try {
543543
$documentHandler->update($document, ['policy' => 'error']);
@@ -638,7 +638,7 @@ public function testMoreCreateUpdateGetAndDeleteDocumentWithRevisionCheck()
638638
// This should result in a failure to update
639639
$document->set('someAttribute', 'someValue3');
640640
$document->set('someOtherAttribute', 'someOtherValue3');
641-
$document->set('_rev', $resultingDocument->getRevision() - 1000);
641+
$document->set('_rev', '_UOarUR----');
642642

643643
$e = null;
644644

0 commit comments

Comments
 (0)