Doctrine\MongoDB\Tests\Query\BuilderTest::testComplexUpdateQuery PHP Method

testComplexUpdateQuery() public method

    public function testComplexUpdateQuery()
    {
        $qb = $this->getTestQueryBuilder()->updateOne()->field('username')->set('jwage')->equals('boo');
        $expected = ['username' => 'boo'];
        $this->assertEquals($expected, $qb->getQueryArray());
        $expected = ['$set' => ['username' => 'jwage']];
        $this->assertEquals($expected, $qb->getNewObj());
    }
BuilderTest