示例#1
0
 /**
  * Get current Job Batch
  *
  * @return Batch
  */
 public function getCurrentBatch()
 {
     if (!$this->currentBatch->isInApiLimit()) {
         $this->addNewBatch();
     }
     return $this->currentBatch;
 }
示例#2
0
 public function testShoulNotBeInBatchApiLimit()
 {
     $batch = new Batch();
     $batch->setBatchSizeLimit(4);
     for ($i = 0; $i < 5; $i++) {
         $batch->addObject($this->getObjectMock());
     }
     $this->assertFalse($batch->isInApiLimit());
 }