/** * {@inheritDoc} */ public function setUp() { parent::setUp(); $this->container = $this->createMock(ContainerInterface::class); $this->logger = $this->createMock(LoggerInterface::class); $this->reader = $this->createMock(Reader::class); }
/** * {@inheritDoc} */ public function setUp() { parent::setUp(); $this->reader = new AnnotationReader(); AnnotationRegistry::registerLoader('class_exists'); }
/** * {@inheritDoc} */ public function setUp() { parent::setUp(); $this->container = $this->createMock(ContainerInterface::class); $this->connection = $this->getMockBuilder(Connection::class)->disableOriginalConstructor()->getMock(); $this->repository = $this->getMockBuilder(ObjectRepository::class)->disableOriginalConstructor()->getMock(); $this->entityManager = $this->createMock(EntityManagerInterface::class); $this->entityManager->expects($this->any())->method('getConnection')->willReturn($this->connection); $this->entityManager->expects($this->any())->method('getRepository')->willReturn($this->repository); $this->entityManagerRegistry = $this->createMock(RegistryInterface::class); $this->entityManagerRegistry->expects(static::any())->method('getManager')->willReturn($this->entityManager); $this->logger = $this->createMock(LoggerInterface::class); $this->reader = $this->createMock(Reader::class); $this->transactionalInterceptor = new TransactionalInterceptor($this->entityManagerRegistry, $this->reader, $this->logger); $this->transactionalInterceptor->setContainer($this->container); }