File: bug00466.phpt

package info (click to toggle)
php-mongo 1.5.7-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 11,040 kB
  • ctags: 2,802
  • sloc: ansic: 17,632; xml: 2,195; php: 1,630; pascal: 330; makefile: 52; sh: 39
file content (21 lines) | stat: -rw-r--r-- 987 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--TEST--
Test for PHP-466: Seed list of 1 replicaset member, and one standalone, with array("replicaSet" => true) fails.
--FILE--
<?php
MongoLog::setModule(MongoLog::ALL);
MongoLog::setLevel(MongoLog::ALL);
function foo($c, $m) { echo $m, "\n"; } set_error_handler('foo');
$m = new MongoClient("mongodb://whisky:13000", array( "connect" => false, "replicaSet" => true ));
$m = new MongoClient("mongodb://whisky:13000", array( "connect" => false, "replicaSet" => 'seta' ));
?>
--EXPECTF--
PARSE   INFO: Parsing mongodb://whisky:13000
PARSE   INFO: - Found node: whisky:13000
PARSE   INFO: - Connection type: STANDALONE
PARSE   WARN: - Found option 'replicaSet': true - Expected the name of the replica set
PARSE   INFO: - Switching connection type: REPLSET
PARSE   INFO: Parsing mongodb://whisky:13000
PARSE   INFO: - Found node: whisky:13000
PARSE   INFO: - Connection type: STANDALONE
PARSE   INFO: - Found option 'replicaSet': 'seta'
PARSE   INFO: - Switching connection type: REPLSET