public function testRestrictQueryGlobal() { $qb = $this->getMock('Doctrine\\ODM\\PHPCR\\Query\\Builder\\QueryBuilder', array('andWhere')); $qb->expects($this->never())->method('andWhere'); $candidates = new PrefixCandidates(array('/routes', '', '/other')); $candidates->restrictQuery($qb); }