function testGetEarliestYear()
 {
     $vehicle1 = $this->createVehicle(array('make'=>'Honda','model'=>'civic','year'=>2000));
     $vehicle2 = $this->createVehicle(array('make'=>'Honda','model'=>'civic','year'=>2001));
     $vehicle3 = $this->createVehicle(array('make'=>'Honda','model'=>'civic','year'=>2002));
     $vehicle4 = $this->createVehicle(array('make'=>'Honda','model'=>'civic','year'=>2003));
     $selection = new VF_Vehicle_Selection(array($vehicle2,$vehicle1,$vehicle3,$vehicle4));
     $this->assertEquals(2000, $selection->earliestYear());
 }
Пример #2
0
 function testShouldDetectEarliestYearInRange()
 {
     $selection = new VF_Vehicle_Selection(array('make' => 'Honda', 'model' => 'Civic', 'year_start' => '2000', 'year_end' => '2005'));
     $this->assertEquals('2000', $selection->earliestYear(), 'should detect earliest year in year range');
 }