99namespace Magento \WebapiAsync \Model ;
1010
1111use Magento \Catalog \Api \Data \ProductInterface ;
12- use Magento \Framework \Exception \NotFoundException ;
1312use Magento \TestFramework \MessageQueue \PreconditionFailedException ;
1413use Magento \TestFramework \MessageQueue \PublisherConsumerController ;
1514use Magento \TestFramework \MessageQueue \EnvironmentPreconditionException ;
2120use Magento \Framework \Webapi \Exception ;
2221use Magento \Catalog \Api \ProductRepositoryInterface ;
2322use Magento \Catalog \Api \Data \ProductInterface as Product ;
23+ use Magento \Framework \ObjectManagerInterface ;
24+ use Magento \Store \Model \Store ;
25+ use Magento \Framework \Webapi \Rest \Request ;
2426
2527/**
2628 * Check async request for multistore product creation service, scheduling bulk
@@ -76,7 +78,7 @@ class AsyncScheduleMultiStoreTest extends WebapiAbstract
7678 private $ productRepository ;
7779
7880 /**
79- * @var \Magento\Framework\ ObjectManagerInterface
81+ * @var ObjectManagerInterface
8082 */
8183 private $ objectManager ;
8284
@@ -92,7 +94,7 @@ protected function setUp()
9294 $ this ->registry = $ this ->objectManager ->get (Registry::class);
9395
9496 $ params = array_merge_recursive (
95- \ Magento \ TestFramework \ Helper \ Bootstrap::getInstance ()->getAppInitParams (),
97+ Bootstrap::getInstance ()->getAppInitParams (),
9698 ['MAGE_DIRS ' => ['cache ' => ['path ' => TESTS_TEMP_DIR . '/cache ' ]]]
9799 );
98100
@@ -126,8 +128,8 @@ public function testAsyncScheduleBulkMultistore($storeCode)
126128 $ product = $ this ->getProductData ();
127129 $ this ->_markTestAsRestOnly ();
128130
129- /** @var $store \Magento\Store\Model\Group */
130- $ store = \ Magento \ TestFramework \ Helper \Bootstrap:: getObjectManager ()-> create (\ Magento \ Store \ Model \ Store::class);
131+ /** @var Store $store */
132+ $ store = $ this -> objectManager -> create (Store::class);
131133 $ store ->load (self ::STORE_CODE_FROM_FIXTURE );
132134 $ this ->assertEquals (
133135 self ::STORE_NAME_FROM_FIXTURE ,
@@ -136,9 +138,9 @@ public function testAsyncScheduleBulkMultistore($storeCode)
136138 );
137139
138140 try {
139- /** @var \Magento\Catalog\Model\ Product $productModel */
140- $ productModel = Bootstrap:: getObjectManager () ->create (
141- \ Magento \ Catalog \ Model \ Product::class,
141+ /** @var Product $productModel */
142+ $ productModel = $ this -> objectManager ->create (
143+ Product::class,
142144 ['data ' => $ product ['product ' ]]
143145 );
144146 $ this ->productRepository ->save ($ productModel );
@@ -186,7 +188,7 @@ private function asyncScheduleAndTest($product, $storeCode = null)
186188 $ serviceInfo = [
187189 'rest ' => [
188190 'resourcePath ' => self ::REST_RESOURCE_PATH . '/ ' . $ sku ,
189- 'httpMethod ' => \ Magento \ Framework \ Webapi \ Rest \ Request::HTTP_METHOD_GET
191+ 'httpMethod ' => Request::HTTP_METHOD_GET
190192 ]
191193 ];
192194 $ storeResponse = $ this ->_webApiCall ($ serviceInfo , $ requestData , null , $ checkingStore );
@@ -318,7 +320,7 @@ private function updateProductAsync($requestData, $sku, $storeCode = null)
318320 $ serviceInfo = [
319321 'rest ' => [
320322 'resourcePath ' => self ::ASYNC_RESOURCE_PATH . '/ ' . $ sku ,
321- 'httpMethod ' => \ Magento \ Framework \ Webapi \ Rest \ Request::HTTP_METHOD_PUT ,
323+ 'httpMethod ' => Request::HTTP_METHOD_PUT ,
322324 ],
323325 ];
324326
@@ -343,15 +345,14 @@ public function assertProductCreation($product)
343345 public static function tearDownAfterClass ()
344346 {
345347 parent ::tearDownAfterClass ();
346- /** @var \Magento\Framework\Registry $registry */
347- $ registry = \Magento \TestFramework \Helper \Bootstrap::getObjectManager ()
348- ->get (\Magento \Framework \Registry::class);
348+ /** @var Registry $registry */
349+ $ registry = Bootstrap::getObjectManager ()->get (Registry::class);
349350
350351 $ registry ->unregister ('isSecureArea ' );
351352 $ registry ->register ('isSecureArea ' , true );
352353
353- /** @var $store \Magento\ Store\Model\Store */
354- $ store = \ Magento \ TestFramework \ Helper \ Bootstrap::getObjectManager ()->create (\ Magento \ Store \ Model \ Store::class);
354+ /** @var Store $store */
355+ $ store = Bootstrap::getObjectManager ()->create (Store::class);
355356 $ store ->load ('fixturestore ' );
356357 if ($ store ->getId ()) {
357358 $ store ->delete ();
0 commit comments