Skip to content

Commit 18e41ba

Browse files
committed
428 - Test coverage: GetAvailableShippingMethodsTest
1 parent 38dd5a0 commit 18e41ba

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
/** @var \Magento\Framework\ObjectManagerInterface $objectManager */
7+
$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
8+
9+
/** @var \Magento\Framework\Registry $registry */
10+
$registry = $objectManager->get(\Magento\Framework\Registry::class);
11+
12+
$registry->unregister('isSecureArea');
13+
$registry->register('isSecureArea', true);
14+
15+
/** @var \Magento\Catalog\Api\ProductRepositoryInterface $productRepository */
16+
$productRepository = $objectManager->create(\Magento\Catalog\Api\ProductRepositoryInterface::class);
17+
18+
try {
19+
$product = $productRepository->get('simple', false, null, true);
20+
$productRepository->delete($product);
21+
} catch (\Magento\Framework\Exception\NoSuchEntityException $exception) {
22+
//Product already removed
23+
}
24+
25+
$registry->unregister('isSecureArea');
26+
$registry->register('isSecureArea', false);

0 commit comments

Comments
 (0)