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

testThatAndAcceptsAnotherQuery() public method

    public function testThatAndAcceptsAnotherQuery()
    {
        $qb = $this->getTestQueryBuilder();
        $qb->addAnd($qb->expr()->field('hits')->gte(1));
        $qb->addAnd($qb->expr()->field('hits')->lt(5));
        $this->assertEquals(['$and' => [['hits' => ['$gte' => 1]], ['hits' => ['$lt' => 5]]]], $qb->getQueryArray());
    }
BuilderTest