Sokil\Mongo\CollectionTest::testUpdateMultiple_ErrorWithUnacknowledgedWriteConcern PHP Method

testUpdateMultiple_ErrorWithUnacknowledgedWriteConcern() public method

    public function testUpdateMultiple_ErrorWithUnacknowledgedWriteConcern()
    {
        // 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(false));
        // create collection with mocked original mongo collection
        $this->collection = new Collection($this->database, $mongoCollectionMock);
        $this->collection->setUnacknowledgedWriteConcern();
        $this->collection->updateMultiple(new Expression(), new Operator());
    }
CollectionTest