/** * Get the parents given a location id. * * @return Response Data serialized in json */ public function getParentsAction() { $id = $this->request->query->get('id'); return $this->createResponseObject(function () use($id) { return $this->normalizeLocationDataArray($this->locationProvider->getParents($id)); }); }
/** * Test get parents with a root location */ public function testGetParentsNotFound() { $locations = $this->locationProviderAdapter->getParents('ES'); $this->assertCount(0, $locations, 'We don\'t expect any location to be returned'); }