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

testCurrentDateUpdateQuery() public method

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