function testGetLatestYear()
 {
     $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,$vehicle4,$vehicle3));
     $this->assertEquals(2003, $selection->latestYear());
 }
Пример #2
0
 function testShouldDetectLatestYearInRange()
 {
     $selection = new VF_Vehicle_Selection(array('make' => 'Honda', 'model' => 'Civic', 'year_start' => '2000', 'year_end' => '2005'));
     $this->assertEquals('2005', $selection->latestYear(), 'should detect latest year in year range');
 }