function testShouldContainMultipleVehicles() { $vehicle1 = $this->createVehicle(array('make'=>'Honda','model'=>'civic','year'=>2000)); $vehicle2 = $this->createVehicle(array('make'=>'Honda','model'=>'civic','year'=>2001)); $selection = new VF_Vehicle_Selection(array($vehicle1,$vehicle2)); $this->assertTrue($selection->contains($vehicle1) ); $this->assertTrue($selection->contains($vehicle2) ); }
function testShouldContainVehicleWithinRange() { $selection = new VF_Vehicle_Selection(array('make' => 'Honda', 'model' => 'Civic', 'year_start' => '2000', 'year_end' => '2005')); $this->assertTrue($selection->contains(array('make' => 'Honda', 'model' => 'Civic', 'year' => '2001')), 'should contain a vehicle within the year range'); }