@@ -23,23 +23,23 @@ public function setUp()
2323 parent ::setUp ();
2424
2525 /** @var AsyncListener $asyncListener */
26- $ asyncListener = $ this -> container ->get ('enqueue.events.async_listener ' );
26+ $ asyncListener = static :: $ container ->get ('enqueue.events.async_listener ' );
2727
2828 $ asyncListener ->resetSyncMode ();
2929 }
3030
3131 public function testCouldBeGetFromContainerAsService ()
3232 {
3333 /** @var AsyncProcessor $processor */
34- $ processor = $ this -> container ->get ('enqueue.events.async_processor ' );
34+ $ processor = static :: $ container ->get ('enqueue.events.async_processor ' );
3535
3636 $ this ->assertInstanceOf (AsyncProcessor::class, $ processor );
3737 }
3838
3939 public function testShouldRejectIfMessageDoesNotContainEventNameProperty ()
4040 {
4141 /** @var AsyncProcessor $processor */
42- $ processor = $ this -> container ->get ('enqueue.events.async_processor ' );
42+ $ processor = static :: $ container ->get ('enqueue.events.async_processor ' );
4343
4444 $ message = new NullMessage ();
4545
@@ -49,7 +49,7 @@ public function testShouldRejectIfMessageDoesNotContainEventNameProperty()
4949 public function testShouldRejectIfMessageDoesNotContainTransformerNameProperty ()
5050 {
5151 /** @var AsyncProcessor $processor */
52- $ processor = $ this -> container ->get ('enqueue.events.async_processor ' );
52+ $ processor = static :: $ container ->get ('enqueue.events.async_processor ' );
5353
5454 $ message = new NullMessage ();
5555 $ message ->setProperty ('event_name ' , 'anEventName ' );
@@ -60,7 +60,7 @@ public function testShouldRejectIfMessageDoesNotContainTransformerNameProperty()
6060 public function testShouldCallRealListener ()
6161 {
6262 /** @var AsyncProcessor $processor */
63- $ processor = $ this -> container ->get ('enqueue.events.async_processor ' );
63+ $ processor = static :: $ container ->get ('enqueue.events.async_processor ' );
6464
6565 $ message = new NullMessage ();
6666 $ message ->setProperty ('event_name ' , 'test_async ' );
@@ -73,7 +73,7 @@ public function testShouldCallRealListener()
7373 $ this ->assertEquals (PsrProcessor::ACK , $ processor ->process ($ message , new NullContext ()));
7474
7575 /** @var TestAsyncListener $listener */
76- $ listener = $ this -> container ->get ('test_async_listener ' );
76+ $ listener = static :: $ container ->get ('test_async_listener ' );
7777
7878 $ this ->assertNotEmpty ($ listener ->calls );
7979
@@ -83,15 +83,15 @@ public function testShouldCallRealListener()
8383 $ this ->assertEquals ('test_async ' , $ listener ->calls [0 ][1 ]);
8484
8585 $ this ->assertSame (
86- $ this -> container ->get ('enqueue.events.event_dispatcher ' ),
86+ static :: $ container ->get ('enqueue.events.event_dispatcher ' ),
8787 $ listener ->calls [0 ][2 ]
8888 );
8989 }
9090
9191 public function testShouldCallRealSubscriber ()
9292 {
9393 /** @var AsyncProcessor $processor */
94- $ processor = $ this -> container ->get ('enqueue.events.async_processor ' );
94+ $ processor = static :: $ container ->get ('enqueue.events.async_processor ' );
9595
9696 $ message = new NullMessage ();
9797 $ message ->setProperty ('event_name ' , 'test_async_subscriber ' );
@@ -104,7 +104,7 @@ public function testShouldCallRealSubscriber()
104104 $ this ->assertEquals (PsrProcessor::ACK , $ processor ->process ($ message , new NullContext ()));
105105
106106 /** @var TestAsyncSubscriber $subscriber */
107- $ subscriber = $ this -> container ->get ('test_async_subscriber ' );
107+ $ subscriber = static :: $ container ->get ('test_async_subscriber ' );
108108
109109 $ this ->assertNotEmpty ($ subscriber ->calls );
110110
@@ -114,7 +114,7 @@ public function testShouldCallRealSubscriber()
114114 $ this ->assertEquals ('test_async_subscriber ' , $ subscriber ->calls [0 ][1 ]);
115115
116116 $ this ->assertSame (
117- $ this -> container ->get ('enqueue.events.event_dispatcher ' ),
117+ static :: $ container ->get ('enqueue.events.event_dispatcher ' ),
118118 $ subscriber ->calls [0 ][2 ]
119119 );
120120 }
0 commit comments