Sokil\Mongo\CollectionTest::testUpdate_UpdateData PHP Method

testUpdate_UpdateData() public method

    public function testUpdate_UpdateData()
    {
        $this->collection->disableDocumentPool();
        // create documents
        $this->collection->createDocument(array('p' => 1))->save();
        $this->collection->update(array(), array('k' => 'v'));
        // test
        $data = $this->collection->find()->findOne()->refresh()->toArray();
        unset($data['_id']);
        $this->assertEquals(array('k' => 'v'), $data);
    }
CollectionTest