File tree Expand file tree Collapse file tree 1 file changed +13
-12
lines changed
lib/internal/Magento/Framework/Amqp/Test/Unit/Connection Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Original file line number Diff line number Diff line change 12
12
use Magento \Framework \ObjectManagerInterface ;
13
13
use Magento \Framework \TestFramework \Unit \Helper \ObjectManager ;
14
14
use PhpAmqpLib \Connection \AMQPConnectionConfig ;
15
+ use PhpAmqpLib \Connection \AMQPStreamConnection ;
15
16
use PHPUnit \Framework \MockObject \MockObject ;
16
17
use PHPUnit \Framework \TestCase ;
17
18
@@ -98,18 +99,18 @@ public function testSSLConnection(bool $sslEnabled, string $connectionClass)
98
99
->method ('getSslOptions ' )
99
100
->willReturn (null );
100
101
101
- $ connection = $ this ->objectManager ->getObject ($ connectionClass , [
102
- '127.0.0.1 ' ,
103
- '5672 ' ,
104
- 'guest ' ,
105
- 'guest ' ,
106
- '/ ' ]
107
- );
108
-
109
102
$ this ->objectManagerInterface ->expects ($ this ->any ())
110
103
->method ('create ' )
111
- ->with ($ connectionClass )
112
- ->willReturn ($ connection );
104
+ ->with (AMQPConnectionConfig::class)
105
+ ->willReturn (
106
+ $ this ->objectManager ->getObject (AMQPConnectionConfig::class, [
107
+ '127.0.0.1 ' ,
108
+ '5672 ' ,
109
+ 'guest ' ,
110
+ 'guest ' ,
111
+ '/ ' ]
112
+ )
113
+ );
113
114
114
115
\Magento \Framework \App \ObjectManager::setInstance ($ this ->objectManagerInterface );
115
116
@@ -126,11 +127,11 @@ public static function connectionDataProvider()
126
127
return [
127
128
[
128
129
'ssl_enabled ' => true ,
129
- 'connection_class ' => AMQPConnectionConfig ::class,
130
+ 'connection_class ' => AMQPStreamConnection ::class,
130
131
],
131
132
[
132
133
'ssl_enabled ' => false ,
133
- 'connection_class ' => AMQPConnectionConfig ::class,
134
+ 'connection_class ' => AMQPStreamConnection ::class,
134
135
],
135
136
];
136
137
}
You can’t perform that action at this time.
0 commit comments