File tree 4 files changed +32
-0
lines changed
4 files changed +32
-0
lines changed Original file line number Diff line number Diff line change 16
16
use Enqueue \Dbal \Symfony \DbalTransportFactory ;
17
17
use Enqueue \Fs \FsConnectionFactory ;
18
18
use Enqueue \Fs \Symfony \FsTransportFactory ;
19
+ use Enqueue \Gps \GpsConnectionFactory ;
20
+ use Enqueue \Gps \Symfony \GpsTransportFactory ;
19
21
use Enqueue \Redis \RedisConnectionFactory ;
20
22
use Enqueue \Redis \Symfony \RedisTransportFactory ;
21
23
use Enqueue \Sqs \SqsConnectionFactory ;
@@ -71,6 +73,10 @@ public function build(ContainerBuilder $container)
71
73
$ extension ->addTransportFactory (new SqsTransportFactory ());
72
74
}
73
75
76
+ if (class_exists (GpsConnectionFactory::class)) {
77
+ $ extension ->addTransportFactory (new GpsTransportFactory ());
78
+ }
79
+
74
80
$ container ->addCompilerPass (new AsyncEventsPass (), PassConfig::TYPE_BEFORE_OPTIMIZATION , 100 );
75
81
$ container ->addCompilerPass (new AsyncTransformersPass (), PassConfig::TYPE_BEFORE_OPTIMIZATION , 100 );
76
82
}
Original file line number Diff line number Diff line change @@ -159,6 +159,13 @@ public function provideEnqueueConfigs()
159
159
],
160
160
],
161
161
]];
162
+
163
+ yield 'gps ' => [[
164
+ 'transport ' => [
165
+ 'default ' => 'gps ' ,
166
+ 'gps ' => [],
167
+ ],
168
+ ]];
162
169
}
163
170
164
171
/**
Original file line number Diff line number Diff line change 13
13
use Enqueue \Bundle \EnqueueBundle ;
14
14
use Enqueue \Dbal \Symfony \DbalTransportFactory ;
15
15
use Enqueue \Fs \Symfony \FsTransportFactory ;
16
+ use Enqueue \Gps \Symfony \GpsTransportFactory ;
16
17
use Enqueue \Redis \Symfony \RedisTransportFactory ;
17
18
use Enqueue \Sqs \Symfony \SqsTransportFactory ;
18
19
use Enqueue \Stomp \Symfony \RabbitMqStompTransportFactory ;
@@ -206,6 +207,23 @@ public function testShouldRegisterSqsTransportFactory()
206
207
$ bundle ->build ($ container );
207
208
}
208
209
210
+ public function testShouldRegisterGpsTransportFactory ()
211
+ {
212
+ $ extensionMock = $ this ->createEnqueueExtensionMock ();
213
+
214
+ $ container = new ContainerBuilder ();
215
+ $ container ->registerExtension ($ extensionMock );
216
+
217
+ $ extensionMock
218
+ ->expects ($ this ->at (8 ))
219
+ ->method ('addTransportFactory ' )
220
+ ->with ($ this ->isInstanceOf (GpsTransportFactory::class))
221
+ ;
222
+
223
+ $ bundle = new EnqueueBundle ();
224
+ $ bundle ->build ($ container );
225
+ }
226
+
209
227
/**
210
228
* @return \PHPUnit_Framework_MockObject_MockObject|EnqueueExtension
211
229
*/
Original file line number Diff line number Diff line change 23
23
"enqueue/redis" : " ^0.8@dev" ,
24
24
"enqueue/dbal" : " ^0.8@dev" ,
25
25
"enqueue/sqs" : " ^0.8@dev" ,
26
+ "enqueue/gps" : " ^0.8@dev" ,
26
27
"enqueue/test" : " ^0.8@dev" ,
27
28
"doctrine/doctrine-bundle" : " ~1.2" ,
28
29
"symfony/monolog-bundle" : " ^2.8|^3" ,
You can’t perform that action at this time.
0 commit comments