Esempio n. 1
0
 /**
  * Find initial lot by lot
  * If lot in argument is initial then returns it
  *
  * @param Lot $lot
  * @return Lot
  */
 public function getInitialLot(Lot $lot)
 {
     if ($lot->isInitial()) {
         return $lot;
     }
     $params = array('id' => $lot->getInitialLotId());
     return $this->findOneBy($params);
 }
Esempio n. 2
0
 public function testGetInitialLotId()
 {
     $this->assertEquals(1, $this->lot->getInitialLotId());
 }