@@ -92,7 +92,6 @@ function testGoodCas($c) {
9292 $ res = $ c ->upsert ($ key , ['name ' => 'bob ' ]);
9393 $ this ->assertNotNull ($ res ->cas ());
9494 $ cas1 = $ res ->cas ();
95- var_dump ($ res ->cas ());
9695
9796 $ options = new ReplaceOptions ();
9897 $ options ->cas ($ cas1 );
@@ -274,7 +273,7 @@ function testCas($c) {
274273 $ this ->wrapException (function () use ($ c , $ key , $ old_cas ) {
275274 $ options = (new \Couchbase \ReplaceOptions ())->cas ($ old_cas );
276275 $ c ->replace ($ key , 'ferret ' , $ options );
277- }, '\Couchbase\CasMismatchException ' , COUCHBASE_KEYALREADYEXISTS );
276+ }, '\Couchbase\CasMismatchException ' , COUCHBASE_ERR_CAS_MISMATCH );
278277 }
279278
280279 /**
@@ -527,7 +526,7 @@ function testMutateInFulldoc($c) {
527526 new \Couchbase \MutateUpsertSpec ('created_at ' , time (), true , true ),
528527 new \Couchbase \MutateReplaceSpec ('' , ["duplicate " => "yes " ])
529528 ], $ options );
530- }, '\Couchbase\KeyExistsException ' );
529+ }, '\Couchbase\CasMismatchException ' );
531530
532531 $ options = (new \Couchbase \MutateInOptions ())->storeSemantics (\Couchbase \StoreSemantics::REPLACE );
533532 $ result = $ c ->mutateIn ($ key , [
@@ -583,7 +582,7 @@ function testMutateIn($c) {
583582 $ result = $ c ->mutateIn ($ key , [
584583 new \Couchbase \MutateUpsertSpec ('newDict ' , 'withWrongCAS ' ),
585584 ], $ options );
586- }, '\Couchbase\KeyExistsException ' );
585+ }, '\Couchbase\CasMismatchException ' );
587586
588587 # once again with correct CAS
589588 $ options = (new \Couchbase \MutateInOptions ())->cas ($ cas );
0 commit comments