本文整理汇总了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);
}
示例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