Sokil\Mongo\CollectionTest::testUpdate_UpdateDataIsOperatorArray PHP Method

testUpdate_UpdateDataIsOperatorArray() public method

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