lithium\tests\cases\data\source\MongoDbTest::testSetReadPreference PHP Method

testSetReadPreference() public method

    public function testSetReadPreference()
    {
        $prefs = array("SECONDARY", array('dc' => 'east', 'use' => 'reporting'));
        $db = new MongoDb(array('autoConnect' => true, 'readPreference' => $prefs, 'classes' => array('server' => 'lithium\\tests\\mocks\\core\\MockCallable')));
        $result = $db->server->call;
        $this->assertEqual('setReadPreference', $result['method']);
        $this->assertEqual($prefs, $result['params']);
    }