Code Duplication    Length = 11-11 lines in 2 locations

bridge/doctrine-phpcr-odm/tests/Functional/ExpressionVisitorTest.php 2 locations

@@ 166-176 (lines=11) @@
163
    /**
164
     * It should visit and composites.
165
     */
166
    public function testVisitCompositeAnd()
167
    {
168
        $this->visitor->dispatch(
169
            Query::composite('and', Query::comparison('eq', 'title', 42))
170
        );
171
172
        $query = $this->queryBuilder;
173
        $children = $query->getChildrenOfType(AbstractNode::NT_WHERE);
174
        $children = $children[0]->getChildrenOfType(AbstractNode::NT_CONSTRAINT);
175
        $this->assertInstanceOf(ConstraintAndx::class, $children[0]);
176
    }
177
178
    /**
179
     * It should visit or composites.
@@ 181-191 (lines=11) @@
178
    /**
179
     * It should visit or composites.
180
     */
181
    public function testVisitCompositeOr()
182
    {
183
        $this->visitor->dispatch(
184
            Query::composite('or', Query::comparison('eq', 'title', 42))
185
        );
186
187
        $query = $this->queryBuilder;
188
        $children = $query->getChildrenOfType(AbstractNode::NT_WHERE);
189
        $children = $children[0]->getChildrenOfType(AbstractNode::NT_CONSTRAINT);
190
        $this->assertInstanceOf(ConstraintOrx::class, $children[0]);
191
    }
192
193
    /**
194
     * Test nested composites.