Пример #1
0
 /**
  * @magentoConfigFixture current_store rss/wishlist/active 1
  * @magentoDataFixture Mage/Wishlist/_files/wishlist.php
  * @magentoAppIsolation enabled
  */
 public function testWishlistAction()
 {
     $wishlist = new Mage_Wishlist_Model_Wishlist();
     $wishlist->load('fixture_unique_code', 'sharing_code');
     $this->getRequest()->setParam('wishlist_id', $wishlist->getId())->setParam('data', base64_encode('1'));
     Mage::getSingleton('Mage_Customer_Model_Session')->login('*****@*****.**', 'password');
     $this->dispatch('rss/index/wishlist');
     $this->assertContains('<![CDATA[Simple Product]]>', $this->getResponse()->getBody());
 }
 /**
  * Retrieve Wishlist model
  *
  * @return Mage_Wishlist_Model_Wishlist
  */
 protected function _getWishlist()
 {
     if (is_null($this->_wishlist)) {
         $this->_wishlist = Mage::getModel('wishlist/wishlist');
         $wishlistId = $this->getRequest()->getParam('wishlist_id');
         if ($wishlistId) {
             $this->_wishlist->load($wishlistId);
         } else {
             if ($this->_getCustomer()->getId()) {
                 $this->_wishlist->loadByCustomer($this->_getCustomer());
             }
         }
     }
     return $this->_wishlist;
 }