Open Journal Systems  3.3.0
HistoryBatchTest.php
1 <?php
2 
3 namespace Guzzle\Tests\Batch;
4 
7 
12 {
14  {
15  $batch = new Batch(
16  $this->getMock('Guzzle\Batch\BatchTransferInterface'),
17  $this->getMock('Guzzle\Batch\BatchDivisorInterface')
18  );
19 
20  $history = new HistoryBatch($batch);
21  $history->add('foo')->add('baz');
22  $this->assertEquals(array('foo', 'baz'), $history->getHistory());
23  $history->clearHistory();
24  $this->assertEquals(array(), $history->getHistory());
25  }
26 }
Guzzle\Batch\HistoryBatch
Definition: HistoryBatch.php:9
Guzzle\Tests\GuzzleTestCase
Definition: GuzzleTestCase.php:22
Guzzle\Tests\Batch\HistoryBatchTest\testMaintainsHistoryOfItemsAddedToBatch
testMaintainsHistoryOfItemsAddedToBatch()
Definition: HistoryBatchTest.php:13
Guzzle\Tests\Batch\HistoryBatchTest
Definition: HistoryBatchTest.php:11
Guzzle\Tests\Batch
Definition: AbstractBatchDecoratorTest.php:3
Guzzle\Batch\Batch
Definition: Batch.php:15