当前位置: 首页>>代码示例>>PHP>>正文


PHP Elite_Vaf_Helper_Data::setRequest方法代码示例

本文整理汇总了PHP中Elite_Vaf_Helper_Data::setRequest方法的典型用法代码示例。如果您正苦于以下问题:PHP Elite_Vaf_Helper_Data::setRequest方法的具体用法?PHP Elite_Vaf_Helper_Data::setRequest怎么用?PHP Elite_Vaf_Helper_Data::setRequest使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Elite_Vaf_Helper_Data的用法示例。


在下文中一共展示了Elite_Vaf_Helper_Data::setRequest方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testSelection

 function testSelection()
 {
     $vehicle = $this->createMMY(self::MAKE, self::MODEL, self::YEAR);
     $request = $this->getRequest($vehicle->toValueArray());
     $helper = new Elite_Vaf_Helper_Data();
     $helper->setRequest($request);
     $vehicle = $helper->vehicleSelection();
     $this->assertMMYTitlesEquals(self::MAKE, self::MODEL, self::YEAR, $vehicle);
 }
开发者ID:ngagestudios,项目名称:magento.vehiclefits.com,代码行数:9,代码来源:Elite_Vaf_SnippetTest.php

示例2: testDeletingFits

 function testDeletingFits()
 {
     // create product & a fit
     $vehicle = $this->createMMY();
     $fit_id = $this->insertMappingMMY($vehicle, self::PRODUCT_ID);
     $product = $this->getProduct(self::PRODUCT_ID);
     $request = $this->getRequest(array('vaf-delete' => array('year-' . $fit_id)));
     // mock up an event and pass it to the SUT observer
     $event = $this->getMock('myEvent');
     $event->expects($this->any())->method('getControllerAction')->will($this->returnValue($this->getController($request)));
     Mage::register('current_product', $product);
     $observer = new Elite_Vaf_Model_Observer_Test();
     $observer->catalogProductEditAction($event);
     $request = $this->getRequest(array('make' => $vehicle->getLevel('make')->getId(), 'model' => $vehicle->getLevel('model')->getId(), 'year' => $vehicle->getLevel('year')->getId()));
     $helper = new Elite_Vaf_Helper_Data();
     $helper->setRequest($request);
     $this->assertEquals(array(0), $helper->getProductIds(), 'deleting fitments should result in there being no fitments');
 }
开发者ID:ngagestudios,项目名称:magento.vehiclefits.com,代码行数:18,代码来源:Elite_Vaf_Model_ObserverTests_ObserverDeleteMappingTest.php


注:本文中的Elite_Vaf_Helper_Data::setRequest方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。