12 private function getMockTransfer()
14 return $this->getMock(
'Guzzle\Batch\BatchTransferInterface');
17 private function getMockDivisor()
19 return $this->getMock(
'Guzzle\Batch\BatchDivisorInterface');
22 private function getMockBatchBuilder()
25 ->transferWith($this->getMockTransfer())
26 ->createBatchesWith($this->getMockDivisor());
32 $this->assertInstanceOf(
'Guzzle\Batch\BatchBuilder', $builder);
37 $batch = $this->getMockBatchBuilder()->autoFlushAt(10)->build();
38 $this->assertInstanceOf(
'Guzzle\Batch\FlushingBatch', $batch);
43 $batch = $this->getMockBatchBuilder()->bufferExceptions()->build();
44 $this->assertInstanceOf(
'Guzzle\Batch\ExceptionBufferingBatch', $batch);
49 $batch = $this->getMockBatchBuilder()->keepHistory()->build();
50 $this->assertInstanceOf(
'Guzzle\Batch\HistoryBatch', $batch);
55 $batch = $this->getMockBatchBuilder()->notify(
function() {})->build();
56 $this->assertInstanceOf(
'Guzzle\Batch\NotifyingBatch', $batch);
78 $this->assertInstanceOf(
'Guzzle\Batch\BatchRequestTransfer', $this->readAttribute($batch,
'transferStrategy'));
84 $this->assertInstanceOf(
'Guzzle\Batch\BatchCommandTransfer', $this->readAttribute($batch,
'transferStrategy'));