/** * {@inheritdoc} */ public function find($entityClass, $id, array $options = array()) { return $this->doctrine->getRepository($entityClass)->find($id); }
public function let(SmartManagerRegistry $doctrine, EntityRepository $repository, EntityManager $entityManager, PropertyAccessorInterface $propertyAccessor) { $doctrine->getRepository('entity_class')->willReturn($repository); $doctrine->getManagerForClass('stdClass')->willReturn($entityManager); $this->beConstructedWith($doctrine, $propertyAccessor); }
/** * @return VersionRepositoryInterface */ public function getVersionRepository() { return $this->registry->getRepository('Pim\\Bundle\\VersioningBundle\\Model\\Version'); }