File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
dev/tests/integration/testsuite/Magento/Framework/MessageQueue Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 6
6
namespace Magento \Framework \MessageQueue \Consumer ;
7
7
8
8
use Magento \Framework \MessageQueue \Consumer \Config \ConsumerConfigItem \Handler \Iterator as HandlerIterator ;
9
+ use Magento \Framework \MessageQueue \DefaultValueProvider ;
9
10
10
11
/**
11
12
* Test of queue consumer configuration reading and parsing.
@@ -19,9 +20,15 @@ class ConfigTest extends \PHPUnit\Framework\TestCase
19
20
*/
20
21
private $ objectManager ;
21
22
23
+ /**
24
+ * @var DefaultValueProvider
25
+ */
26
+ private $ defaultValueProvider ;
27
+
22
28
protected function setUp (): void
23
29
{
24
30
$ this ->objectManager = \Magento \TestFramework \Helper \Bootstrap::getObjectManager ();
31
+ $ this ->defaultValueProvider = $ this ->objectManager ->get (DefaultValueProvider::class);
25
32
}
26
33
27
34
public function testGetConsumers ()
@@ -59,7 +66,7 @@ public function testGetConsumerWithDefaultValues()
59
66
60
67
$ this ->assertEquals ('consumer5 ' , $ consumer ->getName ());
61
68
$ this ->assertEquals ('queue5 ' , $ consumer ->getQueue ());
62
- $ this ->assertEquals (' db ' , $ consumer ->getConnection ());
69
+ $ this ->assertEquals ($ this -> defaultValueProvider -> getConnection () , $ consumer ->getConnection ());
63
70
$ this ->assertEquals (\Magento \Framework \MessageQueue \ConsumerInterface::class, $ consumer ->getConsumerInstance ());
64
71
$ this ->assertNull ($ consumer ->getMaxMessages ());
65
72
$ handlers = $ consumer ->getHandlers ();
Original file line number Diff line number Diff line change 5
5
*/
6
6
namespace Magento \Framework \MessageQueue \Publisher ;
7
7
8
+ use Magento \Framework \MessageQueue \DefaultValueProvider ;
9
+
8
10
/**
9
11
* Test of queue publisher configuration reading and parsing.
10
12
*
@@ -17,9 +19,15 @@ class ConfigTest extends \PHPUnit\Framework\TestCase
17
19
*/
18
20
private $ objectManager ;
19
21
22
+ /**
23
+ * @var DefaultValueProvider
24
+ */
25
+ private $ defaultValueProvider ;
26
+
20
27
protected function setUp (): void
21
28
{
22
29
$ this ->objectManager = \Magento \TestFramework \Helper \Bootstrap::getObjectManager ();
30
+ $ this ->defaultValueProvider = $ this ->objectManager ->get (DefaultValueProvider::class);
23
31
}
24
32
25
33
public function testGetPublishersWithOneEnabledConnection ()
@@ -70,7 +78,7 @@ public function testGetPublishersWithoutEnabledConnection()
70
78
71
79
/** @var \Magento\Framework\MessageQueue\Publisher\Config\PublisherConnectionInterface $connection */
72
80
$ connection = $ publisher ->getConnection ();
73
- $ this ->assertEquals (' db ' , $ connection ->getName (), 'Incorrect default connection name ' );
81
+ $ this ->assertEquals ($ this -> defaultValueProvider -> getConnection () , $ connection ->getName (), 'Incorrect default connection name ' );
74
82
$ this ->assertEquals ('magento ' , $ connection ->getExchange (), 'Incorrect default exchange name ' );
75
83
$ this ->assertFalse ($ connection ->isDisabled (), 'Incorrect connection status ' );
76
84
}
You can’t perform that action at this time.
0 commit comments