Example #1
0
 function testShouldListModelsNotInUseIfConfigSaysTo()
 {
     $vehicle = $this->createVehicle(array('make' => 'Honda', 'model' => 'Civic', 'year' => 2000));
     $_GET['make'] = 'Honda';
     $_GET['requestLevel'] = 'model';
     ob_start();
     $_GET['front'] = 1;
     $config = new Zend_Config(array('search' => array('showAllOptions' => 'true')));
     $ajax = new VF_Ajax();
     $ajax->setConfig($config);
     $ajax->execute($this->getSchema());
     $actual = ob_get_clean();
     $expected = '<option value="Civic">Civic</option>';
     $this->assertEquals($expected, $actual, 'should list models not in use if config says to');
 }