summaryrefslogtreecommitdiff
path: root/vendor/guzzle/guzzle/tests/Guzzle/Tests/Common/Exception/BatchTransferExceptionTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/guzzle/guzzle/tests/Guzzle/Tests/Common/Exception/BatchTransferExceptionTest.php')
-rw-r--r--vendor/guzzle/guzzle/tests/Guzzle/Tests/Common/Exception/BatchTransferExceptionTest.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Common/Exception/BatchTransferExceptionTest.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Common/Exception/BatchTransferExceptionTest.php
new file mode 100644
index 0000000..c72a2a6
--- /dev/null
+++ b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Common/Exception/BatchTransferExceptionTest.php
@@ -0,0 +1,21 @@
+<?php
+
+namespace Guzzle\Tests\Common\Exception;
+
+use Guzzle\Batch\Exception\BatchTransferException;
+
+class BatchTransferExceptionTest extends \Guzzle\Tests\GuzzleTestCase
+{
+ public function testContainsBatch()
+ {
+ $e = new \Exception('Baz!');
+ $t = $this->getMock('Guzzle\Batch\BatchTransferInterface');
+ $d = $this->getMock('Guzzle\Batch\BatchDivisorInterface');
+ $transferException = new BatchTransferException(array('foo'), array(1, 2), $e, $t, $d);
+ $this->assertEquals(array('foo'), $transferException->getBatch());
+ $this->assertSame($t, $transferException->getTransferStrategy());
+ $this->assertSame($d, $transferException->getDivisorStrategy());
+ $this->assertSame($e, $transferException->getPrevious());
+ $this->assertEquals(array(1, 2), $transferException->getTransferredItems());
+ }
+}