Sokil\Mongo\CollectionTest::testUpdateMultiple_ErrorWithWriteConcern PHP Method

testUpdateMultiple_ErrorWithWriteConcern() public method

    public function testUpdateMultiple_ErrorWithWriteConcern()
    {
        // mock mongo's collection
        $mongoCollectionMock = $this->getMock('\\MongoCollection', array('update'), array($this->database->getMongoDB(), 'phpmongo_test_collection'));
        $mongoCollectionMock->expects($this->once())->method('update')->with($this->isType('array'), $this->isType('array'), $this->arrayHasKey('multiple'))->will($this->returnValue(array('ok' => (double) 0, 'err' => 'some_strange_error', 'errmsg' => 'Some strange error')));
        // create collection with mocked original mongo collection
        $this->collection = new Collection($this->database, $mongoCollectionMock);
        $this->collection->setWriteConcern(1);
        $this->collection->updateMultiple(new Expression(), new Operator());
    }
CollectionTest