Ejemplo n.º 1
0
 function testFindById()
 {
     $vehicle = $this->createMMY();
     $finder = new VF_Vehicle_Finder(new VF_Schema());
     $this->getReadAdapter()->getProfiler()->clear();
     $this->getReadAdapter()->getProfiler()->setEnabled(true);
     $finder->findById($vehicle->getId());
     $finder->findById($vehicle->getId());
     $finder->findById($vehicle->getId());
     $finder->findById($vehicle->getId());
     $queries = $this->getReadAdapter()->getProfiler()->getQueryProfiles();
     $this->assertEquals(1, count($queries));
 }
 function definition($vehicle_id)
 {
     $vehicleFinder = new VF_Vehicle_Finder(new VF_Schema());
     return $vehicleFinder->findById($vehicle_id);
 }
Ejemplo n.º 3
0
 function vehicle($vehicleID)
 {
     $vehicleFinder = new VF_Vehicle_Finder(new VF_Schema());
     return $vehicleFinder->findById($vehicleID);
 }