/** * @magentoAppIsolation enabled */ public function testGetAddToWishlistParams() { $product = $this->_objectManager->create('Magento\\Catalog\\Model\\Product'); $product->setId(10); $json = $this->_helper->getAddToWishlistParams($product); $params = (array) json_decode($json); $data = (array) $params['data']; $this->assertEquals('10', $data['product']); $this->assertArrayHasKey('uenc', $data); $this->assertStringEndsWith('wishlist/index/add/', $params['action']); }