function testUnbindBoltFromProduct()
 {
     $this->setRequestParams(array('wheel_side_pattern' => '4x114.3'));
     $binder = new Elite_Vafwheeladapter_Observer_WheelSideBinder();
     $product = new Elite_Vaf_Model_Catalog_Product();
     $product->setId(1);
     $event = $this->event($product);
     $binder->bindWheelSide($event);
     $this->setRequestParams(array('wheel_side_pattern' => ''));
     $binder = new Elite_Vafwheeladapter_Observer_WheelSideBinder();
     $product = new Elite_Vaf_Model_Catalog_Product();
     $product->setId(1);
     $event = $this->event($product);
     $binder->bindWheelSide($event);
     $VFproduct = new VF_Product();
     $VFproduct->setId($product->getId());
     $wheeladapterProduct = new VF_Wheeladapter_Catalog_Product($VFproduct);
     $this->assertFalse($wheeladapterProduct->getWheelSideBoltPattern(), 'should unbind bolt pattern from product');
 }
Exemple #2
0
 function testCreateNewProduct()
 {
     $product = new VF_Product();
     $wheelAdapterProduct = new VF_Wheeladapter_Catalog_Product($product);
     $this->assertFalse($wheelAdapterProduct->getWheelSideBoltPattern(), 'should create new product w/ no bolt patterns');
 }