summaryrefslogtreecommitdiff
path: root/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/HistoryBatchTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/HistoryBatchTest.php')
-rw-r--r--vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/HistoryBatchTest.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/HistoryBatchTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/HistoryBatchTest.php
new file mode 100644
index 0000000..60d6f95
--- /dev/null
+++ b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/HistoryBatchTest.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Guzzle\Tests\Batch;
+
+use Guzzle\Batch\HistoryBatch;
+use Guzzle\Batch\Batch;
+
+/**
+ * @covers Guzzle\Batch\HistoryBatch
+ */
+class HistoryBatchTest extends \Guzzle\Tests\GuzzleTestCase
+{
+ public function testMaintainsHistoryOfItemsAddedToBatch()
+ {
+ $batch = new Batch(
+ $this->getMock('Guzzle\Batch\BatchTransferInterface'),
+ $this->getMock('Guzzle\Batch\BatchDivisorInterface')
+ );
+
+ $history = new HistoryBatch($batch);
+ $history->add('foo')->add('baz');
+ $this->assertEquals(array('foo', 'baz'), $history->getHistory());
+ $history->clearHistory();
+ $this->assertEquals(array(), $history->getHistory());
+ }
+}