22
33namespace LaravelQless \Tests \Queue ;
44
5+ use Illuminate \Contracts \Queue \Queue as QueueContract ;
6+ use Illuminate \Queue \Queue ;
57use Illuminate \Queue \QueueManager ;
8+ use Illuminate \Support \Str ;
69use LaravelQless \Contracts \JobHandler ;
710use LaravelQless \Handler \DefaultHandler ;
811use LaravelQless \Job \QlessJob ;
912use LaravelQless \Queue \QlessConnector ;
1013use LaravelQless \Queue \QlessQueue ;
1114use Orchestra \Testbench \TestCase ;
12- use Illuminate \Contracts \Queue \Queue as QueueContract ;
13- use Illuminate \Queue \Queue ;
1415use Qless \Client ;
1516
1617class QueueTest extends TestCase
@@ -40,7 +41,7 @@ public function testPushPop()
4041 {
4142 $ queue = $ this ->getQueue ();
4243
43- $ queueName = str_random (16 );
44+ $ queueName = Str:: random (16 );
4445
4546 $ jobId = $ queue ->push (Job::class, ['firstKey ' => 'firstValue ' ], $ queueName );
4647
@@ -66,7 +67,7 @@ public function testSubscribe()
6667 {
6768 $ queue = $ this ->getQueue ();
6869
69- $ queuePrefix = str_random (4 ) . '_ ' ;
70+ $ queuePrefix = Str:: random (4 ) . '_ ' ;
7071
7172 for ($ i = 1 ; $ i <=3 ; $ i ++) {
7273 $ queue ->push (Job::class, ['firstKey ' => 'firstValue ' ], $ queuePrefix . $ i );
@@ -102,7 +103,7 @@ public function testUnSubscribe()
102103 {
103104 $ queue = $ this ->getQueue ();
104105
105- $ queuePrefix = str_random (4 ) . '_ ' ;
106+ $ queuePrefix = Str:: random (4 ) . '_ ' ;
106107
107108 for ($ i = 1 ; $ i <=2 ; $ i ++) {
108109 $ queue ->push (Job::class, ['firstKey ' => 'firstValue ' ], $ queuePrefix . $ i );
@@ -130,7 +131,7 @@ public function testUnSubscribe()
130131 */
131132 public function testSize ()
132133 {
133- $ queueName = str_random ();
134+ $ queueName = Str:: random ();
134135
135136 $ queue = $ this ->getQueue ();
136137
@@ -152,9 +153,9 @@ public function testSize()
152153 */
153154 public function testJobOptions ()
154155 {
155- $ queueName = str_random ();
156+ $ queueName = Str:: random ();
156157
157- $ jid = str_random (16 );
158+ $ jid = Str:: random (16 );
158159
159160 $ queue = $ this ->getQueue ();
160161
@@ -179,7 +180,7 @@ public function testDispatchJob()
179180 {
180181 $ this ->setEnv ();
181182
182- $ queueName = str_random ();
183+ $ queueName = Str:: random ();
183184
184185 $ job = new Job (['dispatch ' => 'work ' ]);
185186
@@ -203,7 +204,7 @@ public function testDispatchNowJob()
203204 {
204205 $ this ->setEnv ();
205206
206- $ queueName = str_random ();
207+ $ queueName = Str:: random ();
207208
208209 $ dispatch = Job::dispatchNow (['dispatchNow ' => 'work_as_sync ' ])
209210 ->onQueue ($ queueName )
0 commit comments