Пример #1
0
 /**
  * @magentoDataFixture Magento/Customer/_files/customer.php
  * @magentoDataFixture Magento/Wishlist/_files/wishlist.php
  */
 public function testGetWishlistCustomer()
 {
     $this->_customerSession->loginById(1);
     $expectedCustomer = $this->_customerSession->getCustomerDataObject();
     $actualCustomer = $this->_block->getWishlistCustomer();
     $this->assertInstanceOf('Magento\\Customer\\Api\\Data\\CustomerInterface', $actualCustomer);
     $this->assertEquals((int) $expectedCustomer->getId(), (int) $actualCustomer->getId());
     $this->assertEquals((int) $expectedCustomer->getWebsiteId(), (int) $actualCustomer->getWebsiteId());
     $this->assertEquals((int) $expectedCustomer->getStoreId(), (int) $actualCustomer->getStoreId());
     $this->assertEquals((int) $expectedCustomer->getGroupId(), (int) $actualCustomer->getGroupId());
     $this->assertEquals($expectedCustomer->getCustomAttributes(), $actualCustomer->getCustomAttributes());
     $this->assertEquals($expectedCustomer->getFirstname(), $actualCustomer->getFirstname());
     $this->assertEquals($expectedCustomer->getLastname(), $actualCustomer->getLastname());
     $this->assertEquals($expectedCustomer->getEmail(), $actualCustomer->getEmail());
     $this->assertEquals($expectedCustomer->getEmail(), $actualCustomer->getEmail());
     $this->assertEquals((int) $expectedCustomer->getDefaultBilling(), (int) $actualCustomer->getDefaultBilling());
     $this->assertEquals((int) $expectedCustomer->getDefaultShipping(), (int) $actualCustomer->getDefaultShipping());
 }
Пример #2
0
 /**
  * {@inheritdoc}
  */
 public function getImage($product, $imageId, $attributes = array())
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getImage');
     if (!$pluginInfo) {
         return parent::getImage($product, $imageId, $attributes);
     } else {
         return $this->___callPlugins('getImage', func_get_args(), $pluginInfo);
     }
 }
Пример #3
0
 /**
  * @magentoDataFixture Magento/Customer/_files/customer.php
  * @magentoDataFixture Magento/Wishlist/_files/wishlist.php
  */
 public function testGetWishlistCustomer()
 {
     $this->_customerSession->loginById(1);
     $this->assertEquals($this->_customerSession->getCustomerDataObject(), $this->_block->getWishlistCustomer());
 }