66
77namespace Magento \Amqp \Test \Unit \Setup ;
88
9+ use Magento \Amqp \Setup \ConnectionValidator ;
10+ use Magento \Framework \Config \Data \ConfigData ;
911use Magento \Framework \TestFramework \Unit \Helper \ObjectManager ;
1012use Magento \Amqp \Setup \ConfigOptionsList ;
1113use Magento \Framework \Setup \Option \TextConfigOption ;
1214use Magento \Framework \App \DeploymentConfig ;
15+ use PHPUnit \Framework \MockObject \MockObject ;
16+ use PHPUnit \Framework \TestCase ;
1317
14- class ConfigOptionsListTest extends \ PHPUnit \ Framework \ TestCase
18+ class ConfigOptionsListTest extends TestCase
1519{
1620 /**
1721 * @var ObjectManager
@@ -24,12 +28,12 @@ class ConfigOptionsListTest extends \PHPUnit\Framework\TestCase
2428 private $ model ;
2529
2630 /**
27- * @var \Magento\Amqp\Setup\ ConnectionValidator|\PHPUnit_Framework_MockObject_MockObject
31+ * @var ConnectionValidator|MockObject
2832 */
2933 private $ connectionValidatorMock ;
3034
3135 /**
32- * @var \Magento\Framework\App\ DeploymentConfig|\PHPUnit_Framework_MockObject_MockObject
36+ * @var DeploymentConfig|MockObject
3337 */
3438 private $ deploymentConfigMock ;
3539
@@ -38,7 +42,7 @@ class ConfigOptionsListTest extends \PHPUnit\Framework\TestCase
3842 */
3943 private $ options ;
4044
41- protected function setUp ()
45+ protected function setUp (): void
4246 {
4347 $ this ->options = [
4448 ConfigOptionsList::INPUT_KEY_QUEUE_AMQP_HOST => 'host ' ,
@@ -51,18 +55,18 @@ protected function setUp()
5155 ];
5256
5357 $ this ->objectManager = new ObjectManager ($ this );
54- $ this ->connectionValidatorMock = $ this ->getMockBuilder (\ Magento \ Amqp \ Setup \ ConnectionValidator::class)
58+ $ this ->connectionValidatorMock = $ this ->getMockBuilder (ConnectionValidator::class)
5559 ->disableOriginalConstructor ()
5660 ->setMethods ([])
5761 ->getMock ();
5862
59- $ this ->deploymentConfigMock = $ this ->getMockBuilder (\ Magento \ Framework \ App \ DeploymentConfig::class)
63+ $ this ->deploymentConfigMock = $ this ->getMockBuilder (DeploymentConfig::class)
6064 ->disableOriginalConstructor ()
6165 ->setMethods ([])
6266 ->getMock ();
6367
6468 $ this ->model = $ this ->objectManager ->getObject (
65- \ Magento \ Amqp \ Setup \ ConfigOptionsList::class,
69+ ConfigOptionsList::class,
6670 [
6771 'connectionValidator ' => $ this ->connectionValidatorMock ,
6872 ]
@@ -135,9 +139,9 @@ public function testCreateConfig($options, $expectedConfigData)
135139 $ result = $ this ->model ->createConfig ($ options , $ this ->deploymentConfigMock );
136140 $ this ->assertInternalType ('array ' , $ result );
137141 $ this ->assertNotEmpty ($ result );
138- /** @var \Magento\Framework\Config\Data\ ConfigData $configData */
142+ /** @var ConfigData $configData */
139143 $ configData = $ result [0 ];
140- $ this ->assertInstanceOf (\ Magento \ Framework \ Config \ Data \ ConfigData::class, $ configData );
144+ $ this ->assertInstanceOf (ConfigData::class, $ configData );
141145 $ this ->assertEquals ($ expectedConfigData , $ configData ->getData ());
142146 }
143147
0 commit comments