public function testRightJoin() { $source1 = $this->getMock('PHPCR\\Query\\QOM\\SourceInterface', array(), array()); $source2 = $this->getMock('PHPCR\\Query\\QOM\\SourceInterface', array(), array()); $joinCondition = $this->getMock('PHPCR\\Query\\QOM\\SameNodeJoinConditionInterface', array(), array()); $this->qf->expects($this->once())->method('join')->with($source1, $source2, $this->equalTo(\PHPCR\Query\QOM\QueryObjectModelConstantsInterface::JCR_JOIN_TYPE_RIGHT_OUTER), $joinCondition); $qb = new QueryBuilder($this->qf); $qb->from($source1); $qb->rightJoin($source2, $joinCondition); }