Sokil\Mongo\CollectionTest::testUpdate_UpdateDataIsOperatorObject PHP Method

testUpdate_UpdateDataIsOperatorObject() public method

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