Sokil\Mongo\CollectionTest::testInsert_Acknowledged_Error PHP Method

testInsert_Acknowledged_Error() public method

    public function testInsert_Acknowledged_Error()
    {
        $this->collectionMock = $this->getMock('\\MongoCollection', array('insert'), array($this->database->getMongoDB(), 'phpmongo_test_collection'));
        $this->collectionMock->expects($this->once())->method('insert')->will($this->returnValue(array('ok' => (double) 0, 'err' => 'some_error', 'errmsg' => 'Some strange error')));
        $collection = new Collection($this->database, $this->collectionMock);
        $collection->setWriteConcern(1);
        $collection->insert(array('a' => 1, 'b' => 2));
    }
CollectionTest