Пример #1
0
 function showSearchButton()
 {
     $block = new VF_Search_Form();
     $block->setConfig($this->getConfig());
     return $block->showSearchButton();
 }
Пример #2
0
 function test_YMMShouldListMakesNotInUseIfConfigSaysTo()
 {
     $this->switchSchema('year,make,model');
     $config = new Zend_Config(array('search' => array('showAllOptions' => 'true')));
     $vehicle = $this->createVehicle(array('make' => 'Honda', 'model' => 'Civic', 'year' => 2000));
     $search = new VF_Search_Form();
     $search->setConfig($config);
     VF_Singleton::getInstance()->setRequest($this->getRequest());
     $request = $this->getRequest($vehicle->toTitleArray());
     VF_Singleton::getInstance()->setRequest($request);
     $this->setRequest($request);
     $actual = $search->listEntities('make');
     $this->assertEquals(1, count($actual), 'should list makes not in use when config says to');
 }