Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/MongoDB/ReadConcern.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ void php_phongo_readconcern_init_ce(INIT_FUNC_ARGS) /* {{{ */
zend_declare_class_constant_stringl(php_phongo_readconcern_ce, ZEND_STRL("LOCAL"), ZEND_STRL(MONGOC_READ_CONCERN_LEVEL_LOCAL) TSRMLS_CC);
zend_declare_class_constant_stringl(php_phongo_readconcern_ce, ZEND_STRL("MAJORITY"), ZEND_STRL(MONGOC_READ_CONCERN_LEVEL_MAJORITY) TSRMLS_CC);
zend_declare_class_constant_stringl(php_phongo_readconcern_ce, ZEND_STRL("LINEARIZABLE"), ZEND_STRL(MONGOC_READ_CONCERN_LEVEL_LINEARIZABLE) TSRMLS_CC);
zend_declare_class_constant_stringl(php_phongo_readconcern_ce, ZEND_STRL("AVAILABLE"), ZEND_STRL("available") TSRMLS_CC);
} /* }}} */

/*
Expand Down
2 changes: 2 additions & 0 deletions tests/readConcern/readconcern-bsonserialize-001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ $tests = [
new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::LINEARIZABLE),
new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::LOCAL),
new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::MAJORITY),
new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::AVAILABLE),
];

foreach ($tests as $test) {
Expand All @@ -24,4 +25,5 @@ foreach ($tests as $test) {
{ "level" : "linearizable" }
{ "level" : "local" }
{ "level" : "majority" }
{ "level" : "available" }
===DONE===
5 changes: 5 additions & 0 deletions tests/readConcern/readconcern-bsonserialize-002.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ $tests = [
new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::LINEARIZABLE),
new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::LOCAL),
new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::MAJORITY),
new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::AVAILABLE),
];

foreach ($tests as $test) {
Expand All @@ -34,4 +35,8 @@ object(stdClass)#%d (%d) {
["level"]=>
string(8) "majority"
}
object(stdClass)#%d (%d) {
["level"]=>
string(9) "available"
}
===DONE===
2 changes: 2 additions & 0 deletions tests/readConcern/readconcern-constants.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ require_once __DIR__ . "/../utils/basic.inc";
var_dump(MongoDB\Driver\ReadConcern::LINEARIZABLE);
var_dump(MongoDB\Driver\ReadConcern::LOCAL);
var_dump(MongoDB\Driver\ReadConcern::MAJORITY);
var_dump(MongoDB\Driver\ReadConcern::AVAILABLE);

?>
===DONE===
Expand All @@ -17,4 +18,5 @@ var_dump(MongoDB\Driver\ReadConcern::MAJORITY);
string(12) "linearizable"
string(5) "local"
string(8) "majority"
string(9) "available"
===DONE===
5 changes: 5 additions & 0 deletions tests/readConcern/readconcern-debug-001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ $tests = [
new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::LINEARIZABLE),
new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::LOCAL),
new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::MAJORITY),
new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::AVAILABLE),
];

foreach ($tests as $test) {
Expand All @@ -34,4 +35,8 @@ object(MongoDB\Driver\ReadConcern)#%d (%d) {
["level"]=>
string(8) "majority"
}
object(MongoDB\Driver\ReadConcern)#%d (%d) {
["level"]=>
string(9) "available"
}
===DONE===