예제 #1
0
 protected function setUp()
 {
     $this->channel = $this->prophesize(AMQPChannel::class);
     $this->serializer = $this->prophesize(Serializer::class);
     $this->eventDispatcher = $this->prophesize(EventDispatcherInterface::class);
     $this->parser = $this->prophesize(Parser::class);
     $this->manager = new ConsumerManager($this->channel->reveal(), self::EXCHANGE_NAME, $this->serializer->reveal(), $this->parser->reveal());
     $this->manager->setEventDispatcher($this->eventDispatcher->reveal());
 }
 public function testGetContentDataWrongType()
 {
     $type = new ContactSelectionContentType($this->template, $this->contactManager->reveal(), $this->accountManager->reveal(), $this->serializer->reveal(), new CustomerIdConverter(), new IndexComparator());
     $this->property->getValue()->willReturn('blabla');
     $this->contactManager->getById(Argument::any(), Argument::any())->shouldNotBeCalled();
     $this->accountManager->getById(Argument::any(), Argument::any())->shouldNotBeCalled();
     $result = $type->getContentData($this->property->reveal());
     $this->assertCount(0, $result);
 }
 /** {@inheritdoc} */
 public function setUp()
 {
     $this->serializer = $this->prophesize(Serializer::class);
     $this->converter = new ObjectToArrayConverter($this->serializer->reveal());
 }