Skip to content

Commit f81392a

Browse files
committed
Merged pull request #725
2 parents f8b06e6 + 5c7fa9b commit f81392a

File tree

5 files changed

+15
-0
lines changed

5 files changed

+15
-0
lines changed

src/MongoDB/ReadConcern.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ void php_phongo_readconcern_init_ce(INIT_FUNC_ARGS) /* {{{ */
208208
zend_declare_class_constant_stringl(php_phongo_readconcern_ce, ZEND_STRL("LOCAL"), ZEND_STRL(MONGOC_READ_CONCERN_LEVEL_LOCAL) TSRMLS_CC);
209209
zend_declare_class_constant_stringl(php_phongo_readconcern_ce, ZEND_STRL("MAJORITY"), ZEND_STRL(MONGOC_READ_CONCERN_LEVEL_MAJORITY) TSRMLS_CC);
210210
zend_declare_class_constant_stringl(php_phongo_readconcern_ce, ZEND_STRL("LINEARIZABLE"), ZEND_STRL(MONGOC_READ_CONCERN_LEVEL_LINEARIZABLE) TSRMLS_CC);
211+
zend_declare_class_constant_stringl(php_phongo_readconcern_ce, ZEND_STRL("AVAILABLE"), ZEND_STRL("available") TSRMLS_CC);
211212
} /* }}} */
212213

213214
/*

tests/readConcern/readconcern-bsonserialize-001.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ $tests = [
1010
new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::LINEARIZABLE),
1111
new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::LOCAL),
1212
new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::MAJORITY),
13+
new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::AVAILABLE),
1314
];
1415

1516
foreach ($tests as $test) {
@@ -24,4 +25,5 @@ foreach ($tests as $test) {
2425
{ "level" : "linearizable" }
2526
{ "level" : "local" }
2627
{ "level" : "majority" }
28+
{ "level" : "available" }
2729
===DONE===

tests/readConcern/readconcern-bsonserialize-002.phpt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ $tests = [
1010
new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::LINEARIZABLE),
1111
new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::LOCAL),
1212
new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::MAJORITY),
13+
new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::AVAILABLE),
1314
];
1415

1516
foreach ($tests as $test) {
@@ -34,4 +35,8 @@ object(stdClass)#%d (%d) {
3435
["level"]=>
3536
string(8) "majority"
3637
}
38+
object(stdClass)#%d (%d) {
39+
["level"]=>
40+
string(9) "available"
41+
}
3742
===DONE===

tests/readConcern/readconcern-constants.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ require_once __DIR__ . "/../utils/basic.inc";
99
var_dump(MongoDB\Driver\ReadConcern::LINEARIZABLE);
1010
var_dump(MongoDB\Driver\ReadConcern::LOCAL);
1111
var_dump(MongoDB\Driver\ReadConcern::MAJORITY);
12+
var_dump(MongoDB\Driver\ReadConcern::AVAILABLE);
1213

1314
?>
1415
===DONE===
@@ -17,4 +18,5 @@ var_dump(MongoDB\Driver\ReadConcern::MAJORITY);
1718
string(12) "linearizable"
1819
string(5) "local"
1920
string(8) "majority"
21+
string(9) "available"
2022
===DONE===

tests/readConcern/readconcern-debug-001.phpt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ $tests = [
1010
new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::LINEARIZABLE),
1111
new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::LOCAL),
1212
new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::MAJORITY),
13+
new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::AVAILABLE),
1314
];
1415

1516
foreach ($tests as $test) {
@@ -34,4 +35,8 @@ object(MongoDB\Driver\ReadConcern)#%d (%d) {
3435
["level"]=>
3536
string(8) "majority"
3637
}
38+
object(MongoDB\Driver\ReadConcern)#%d (%d) {
39+
["level"]=>
40+
string(9) "available"
41+
}
3742
===DONE===

0 commit comments

Comments
 (0)