Skip to content

Commit e152f2e

Browse files
author
OlgaVasyltsun
committed
MAGETWO-96690: Incorrect Rss Wishlist response
1 parent ea27437 commit e152f2e

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

app/code/Magento/Wishlist/Model/Rss/Wishlist.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public function __construct(
115115
*/
116116
public function isAllowed()
117117
{
118-
return (bool)$this->scopeConfig->isSetFlag('rss/wishlist/active', ScopeInterface::SCOPE_STORE)
118+
return $this->scopeConfig->isSetFlag('rss/wishlist/active', ScopeInterface::SCOPE_STORE)
119119
&& $this->getWishlist()->getCustomerId() == $this->wishlistHelper->getCustomer()->getId();
120120
}
121121

dev/tests/integration/testsuite/Magento/Wishlist/_files/two_wishlists_for_two_diff_customers_rollback.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88
use Magento\Customer\Api\CustomerRepositoryInterface;
99
use Magento\Framework\Exception\NoSuchEntityException;
1010

11+
/** @var \Magento\Framework\ObjectManagerInterface $objectManager */
12+
$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
13+
1114
/** @var \Magento\Framework\Registry $registry */
12-
$registry = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(\Magento\Framework\Registry::class);
15+
$registry = $objectManager->get(\Magento\Framework\Registry::class);
1316
$registry->unregister('isSecureArea');
1417
$registry->register('isSecureArea', true);
1518

16-
/** @var \Magento\Framework\ObjectManagerInterface $objectManager */
17-
$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
18-
1919
/** @var \Magento\Wishlist\Model\Wishlist $wishlist */
2020
$wishlist = $objectManager->create(\Magento\Wishlist\Model\Wishlist::class);
2121

@@ -29,9 +29,7 @@
2929
$wishlist->loadByCustomerId($secondCustomer->getId());
3030
$wishlist->delete();
3131
} catch (NoSuchEntityException $e) {
32-
/**
33-
* Tests which are wrapped with MySQL transaction clear all data by transaction rollback.
34-
*/
32+
/** Tests which are wrapped with MySQL transaction clear all data by transaction rollback. */
3533
}
3634

3735
$registry->unregister('isSecureArea');

0 commit comments

Comments
 (0)