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

testBitXorUpdateQuery() public method

    public function testBitXorUpdateQuery()
    {
        $qb = $this->getTestQueryBuilder()->updateOne()->field('flags')->bitXor(15)->field('username')->equals('boo');
        $expected = ['username' => 'boo'];
        $this->assertEquals($expected, $qb->getQueryArray());
        $expected = ['$bit' => ['flags' => ['xor' => 15]]];
        $this->assertEquals($expected, $qb->getNewObj());
    }
BuilderTest