@@ -83,11 +83,12 @@ public function testTopologyInstallation(array $expectedConfig, array $bindingCo
83
83
*/
84
84
public function exchangeDataProvider (): array
85
85
{
86
+ $ virtualHost = defined ('RABBITMQ_VIRTUALHOST ' ) ? RABBITMQ_VIRTUALHOST : Amqp::DEFAULT_VIRTUALHOST ;
86
87
return [
87
88
'magento-topic-based-exchange1 ' => [
88
89
'exchangeConfig ' => [
89
90
'name ' => 'magento-topic-based-exchange1 ' ,
90
- 'vhost ' => ' / ' ,
91
+ 'vhost ' => $ virtualHost ,
91
92
'type ' => 'topic ' ,
92
93
'durable ' => true ,
93
94
'auto_delete ' => false ,
@@ -99,7 +100,7 @@ public function exchangeDataProvider(): array
99
100
'bindingConfig ' => [
100
101
[
101
102
'source ' => 'magento-topic-based-exchange1 ' ,
102
- 'vhost ' => ' / ' ,
103
+ 'vhost ' => $ virtualHost ,
103
104
'destination ' => 'topic-queue1 ' ,
104
105
'destination_type ' => 'queue ' ,
105
106
'routing_key ' => 'anotherTopic1 ' ,
@@ -112,7 +113,7 @@ public function exchangeDataProvider(): array
112
113
'magento-topic-based-exchange2 ' => [
113
114
'exchangeConfig ' => [
114
115
'name ' => 'magento-topic-based-exchange2 ' ,
115
- 'vhost ' => ' / ' ,
116
+ 'vhost ' => $ virtualHost ,
116
117
'type ' => 'topic ' ,
117
118
'durable ' => true ,
118
119
'auto_delete ' => false ,
@@ -125,7 +126,7 @@ public function exchangeDataProvider(): array
125
126
'bindingConfig ' => [
126
127
[
127
128
'source ' => 'magento-topic-based-exchange2 ' ,
128
- 'vhost ' => ' / ' ,
129
+ 'vhost ' => $ virtualHost ,
129
130
'destination ' => 'topic-queue2 ' ,
130
131
'destination_type ' => 'queue ' ,
131
132
'routing_key ' => 'anotherTopic2 ' ,
@@ -140,7 +141,7 @@ public function exchangeDataProvider(): array
140
141
'magento-topic-based-exchange3 ' => [
141
142
'exchangeConfig ' => [
142
143
'name ' => 'magento-topic-based-exchange3 ' ,
143
- 'vhost ' => ' / ' ,
144
+ 'vhost ' => $ virtualHost ,
144
145
'type ' => 'topic ' ,
145
146
'durable ' => false ,
146
147
'auto_delete ' => true ,
@@ -152,7 +153,7 @@ public function exchangeDataProvider(): array
152
153
'magento-topic-based-exchange4 ' => [
153
154
'exchangeConfig ' => [
154
155
'name ' => 'magento-topic-based-exchange4 ' ,
155
- 'vhost ' => ' / ' ,
156
+ 'vhost ' => $ virtualHost ,
156
157
'type ' => 'topic ' ,
157
158
'durable ' => true ,
158
159
'auto_delete ' => false ,
@@ -162,7 +163,7 @@ public function exchangeDataProvider(): array
162
163
'bindingConfig ' => [
163
164
[
164
165
'source ' => 'magento-topic-based-exchange4 ' ,
165
- 'vhost ' => ' / ' ,
166
+ 'vhost ' => $ virtualHost ,
166
167
'destination ' => 'topic-queue1 ' ,
167
168
'destination_type ' => 'queue ' ,
168
169
'routing_key ' => '# ' ,
@@ -172,7 +173,7 @@ public function exchangeDataProvider(): array
172
173
],
173
174
[
174
175
'source ' => 'magento-topic-based-exchange4 ' ,
175
- 'vhost ' => ' / ' ,
176
+ 'vhost ' => $ virtualHost ,
176
177
'destination ' => 'topic-queue2 ' ,
177
178
'destination_type ' => 'queue ' ,
178
179
'routing_key ' => '*.*.* ' ,
0 commit comments