Example #1
0
 /**
  * @param SearchModel $search
  *
  * @return \Doctrine\ORM\Query
  */
 public function getQueryFromSearch(SearchModel $search)
 {
     $nodes = $this->locationManager->getChildren($search->getLocation(), true, 'name', 'ASC', true);
     $results = [];
     foreach ($nodes as $location) {
         $results[] = $location->getId();
     }
     return $this->repository->getQueryFromSearch($search, $results);
 }
 public function testFindCitiesMatching()
 {
     $dptId = 12;
     $this->repository->expects($this->once())->method('findCitiesMatching')->with($this->equalTo($dptId));
     $this->manager->findCitiesMatching($dptId);
 }