@@ -16,47 +16,41 @@ public function tearDown()
1616
1717 public function testDefaultConnectionCanBeResolved ()
1818 {
19- $ config = new Repository ([
20- 'queue.default ' => 'sync ' ,
21- 'queue.connections.sync ' => ['driver ' => 'sync ' ],
22- ]);
23-
2419 $ app = [
25- 'config ' => $ config ,
20+ 'config ' => [
21+ 'queue.default ' => 'sync ' ,
22+ 'queue.connections.sync ' => ['driver ' => 'sync ' ],
23+ ],
2624 'encrypter ' => $ encrypter = m::mock ('Illuminate\Contracts\Encryption\Encrypter ' ),
2725 ];
2826
2927 $ manager = new QueueManager ($ app );
3028 $ connector = m::mock ('StdClass ' );
3129 $ queue = m::mock ('StdClass ' );
3230 $ queue ->shouldReceive ('setConnectionName ' )->once ()->with ('sync ' )->andReturnSelf ();
33- $ queue ->shouldReceive ('setQueuePrefix ' )->once ()->with ('' )->andReturnSelf ();
3431 $ connector ->shouldReceive ('connect ' )->once ()->with (['driver ' => 'sync ' ])->andReturn ($ queue );
3532 $ manager ->addConnector ('sync ' , function () use ($ connector ) {
3633 return $ connector ;
3734 });
38- $ queue ->shouldReceive ('setContainer ' )->once ()->with ($ app );
3935
36+ $ queue ->shouldReceive ('setContainer ' )->once ()->with ($ app );
4037 $ this ->assertSame ($ queue , $ manager ->connection ('sync ' ));
4138 }
4239
4340 public function testOtherConnectionCanBeResolved ()
4441 {
45- $ config = new Repository ([
46- 'queue.default ' => 'sync ' ,
47- 'queue.connections.foo ' => ['driver ' => 'bar ' ],
48- ]);
49-
5042 $ app = [
51- 'config ' => $ config ,
43+ 'config ' => [
44+ 'queue.default ' => 'sync ' ,
45+ 'queue.connections.foo ' => ['driver ' => 'bar ' ],
46+ ],
5247 'encrypter ' => $ encrypter = m::mock ('Illuminate\Contracts\Encryption\Encrypter ' ),
5348 ];
5449
5550 $ manager = new QueueManager ($ app );
5651 $ connector = m::mock ('StdClass ' );
5752 $ queue = m::mock ('StdClass ' );
5853 $ queue ->shouldReceive ('setConnectionName ' )->once ()->with ('foo ' )->andReturnSelf ();
59- $ queue ->shouldReceive ('setQueuePrefix ' )->once ()->with ('' )->andReturnSelf ();
6054 $ connector ->shouldReceive ('connect ' )->once ()->with (['driver ' => 'bar ' ])->andReturn ($ queue );
6155 $ manager ->addConnector ('bar ' , function () use ($ connector ) {
6256 return $ connector ;
@@ -68,20 +62,17 @@ public function testOtherConnectionCanBeResolved()
6862
6963 public function testNullConnectionCanBeResolved ()
7064 {
71- $ config = new Repository ([
72- 'queue.default ' => 'null ' ,
73- ]);
74-
7565 $ app = [
76- 'config ' => $ config ,
66+ 'config ' => [
67+ 'queue.default ' => 'null ' ,
68+ ],
7769 'encrypter ' => $ encrypter = m::mock ('Illuminate\Contracts\Encryption\Encrypter ' ),
7870 ];
7971
8072 $ manager = new QueueManager ($ app );
8173 $ connector = m::mock ('StdClass ' );
8274 $ queue = m::mock ('StdClass ' );
8375 $ queue ->shouldReceive ('setConnectionName ' )->once ()->with ('null ' )->andReturnSelf ();
84- $ queue ->shouldReceive ('setQueuePrefix ' )->once ()->with ('' )->andReturnSelf ();
8576 $ connector ->shouldReceive ('connect ' )->once ()->with (['driver ' => 'null ' ])->andReturn ($ queue );
8677 $ manager ->addConnector ('null ' , function () use ($ connector ) {
8778 return $ connector ;
0 commit comments