23 private $objectManagerHelper;
37 $this->configMock = $this->getMockBuilder(ConfigInterface::class)
38 ->getMockForAbstractClass();
39 $this->subjectMock = $this->getMockBuilder(PublisherConfigCompositeReader::class)
40 ->disableOriginalConstructor()
43 $this->objectManagerHelper =
new ObjectManagerHelper($this);
44 $this->plugin = $this->objectManagerHelper->getObject(
45 PublisherConfigReaderPlugin::class,
46 [
'config' => $this->configMock]
56 'exchange' =>
'exchange1' 60 'exchange' =>
'exchange2' 67 'name' =>
'connection1',
68 'exchange' =>
'exchange1',
76 'name' =>
'connection2',
77 'exchange' =>
'exchange2',
85 $this->configMock->expects(static::atLeastOnce())
88 $this->configMock->expects(static::atLeastOnce())
89 ->method(
'getConnectionByTopic')
92 [
'topic1',
'connection1'],
93 [
'topic2',
'connection2']
97 $this->assertEquals($finalResult, $this->plugin->afterRead($this->subjectMock,
$result));