1212use Magento \ConfigurableProduct \Test \Fixture \Attribute as AttributeFixture ;
1313use Magento \ConfigurableProduct \Test \Fixture \Product as ConfigurableProductFixture ;
1414use Magento \Customer \Test \Fixture \Customer as CustomerFixture ;
15- use Magento \Framework \Exception \NoSuchEntityException ;
1615use Magento \Quote \Test \Fixture \AddProductToCart as AddProductToCartFixture ;
1716use Magento \Quote \Test \Fixture \CustomerCart as CustomerCartFixture ;
18- use Magento \TestFramework \Fixture \Config as Config ;
17+ use Magento \TestFramework \Fixture \Config ;
1918use Magento \TestFramework \Fixture \DataFixture ;
2019use Magento \TestFramework \Fixture \DataFixtureStorageManager ;
2120use Magento \TestFramework \Fixture \DataFixtureStorage ;
4039 * @magentoDbIsolation disabled
4140 * @magentoAppIsolation enabled
4241 * @magentoAppArea frontend
43- * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
4442 */
4543class PlaceOrderWithDhlUsCarrierTest extends TestCase
4644{
@@ -58,7 +56,7 @@ class PlaceOrderWithDhlUsCarrierTest extends TestCase
5856 * @var CartManagementInterface
5957 */
6058 private CartManagementInterface $ cartManagement ;
61-
59+
6260 /**
6361 * @var OrderRepositoryInterface
6462 */
@@ -158,13 +156,14 @@ protected function setUp(): void
158156 ]
159157 /**
160158 * Verifies successful order placement using DHL-US shipping carrier
159+ *
160+ * @return void
161161 */
162- public function testPlaceOrderWithAllProductTypes ()
162+ public function testPlaceOrderWithDhlUsCarrierTest (): void
163163 {
164164 $ cartId = (int )$ this ->fixtures ->get ('cart ' )->getId ();
165165 $ this ->setShippingAndBillingAddressForQuote ($ cartId );
166- $ orderId = $ this ->selectDhlAndCheckmoAndPlaceOrder ($ cartId );
167- $ order = $ this ->orderRepository ->get ($ orderId );
166+ $ order = $ this ->orderRepository ->get ($ this ->selectDhlAndCheckmoAndPlaceOrder ($ cartId ));
168167 $ this ->assertNotEmpty ($ order ->getIncrementId ());
169168 $ this ->assertSame ('dhl_P ' , $ order ->getShippingMethod ());
170169 }
@@ -174,7 +173,6 @@ public function testPlaceOrderWithAllProductTypes()
174173 *
175174 * @param int $cartId
176175 * @return void
177- * @throws NoSuchEntityException
178176 */
179177 private function setShippingAndBillingAddressForQuote (int $ cartId ): void
180178 {
@@ -200,9 +198,6 @@ private function setShippingAndBillingAddressForQuote(int $cartId): void
200198 *
201199 * @param int $cartId
202200 * @return int $cartId
203- * @throws CouldNotSaveException
204- * @throws InputException
205- * @throws NoSuchEntityException
206201 */
207202 private function selectDhlAndCheckmoAndPlaceOrder (int $ cartId ): int
208203 {
0 commit comments