Example #1
0
 public function testGetCustomerGroupId()
 {
     $this->_model->setCustomerGroupId(null);
     $this->assertEquals(32000, $this->_model->getCustomerGroupId());
     $this->_model->setCustomerGroupId(2);
     $this->assertEquals(2, $this->_model->getCustomerGroupId());
 }
Example #2
0
 public function testCheckQuoteItemQty()
 {
     $this->_model->setData('manage_stock', 1);
     $this->_model->setData('is_in_stock', 1);
     $this->_model->setProductName('qwerty');
     $this->_model->setData('backorders', 3);
     $result = $this->_model->checkQuoteItemQty(1, 1);
     $this->assertEquals('We don\'t have as many "qwerty" as you requested.', $result->getMessage());
 }
Example #3
0
 public function testGetIdentities()
 {
     $this->_model->setProductId(1);
     $this->assertEquals(['catalog_product_1'], $this->_model->getIdentities());
 }