public function testGetOneOrNullResult_noResults() { $this->phpcrQuery->expects($this->once())->method('execute')->will($this->returnValue(array())); $res = $this->query->getOneOrNullResult(Query::HYDRATE_PHPCR); $this->assertNull($res); }