����JFIF��x�x����'
Server IP : 78.140.185.180 / Your IP : 3.145.45.170 Web Server : LiteSpeed System : Linux cpanel13.v.fozzy.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : builderbox ( 1072) PHP Version : 7.3.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/builderbox/public_html/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/ |
Upload File : |
<?php namespace Guzzle\Tests\Batch; use Guzzle\Batch\BatchBuilder; /** * @covers Guzzle\Batch\BatchBuilder */ class BatchBuilderTest extends \Guzzle\Tests\GuzzleTestCase { private function getMockTransfer() { return $this->getMock('Guzzle\Batch\BatchTransferInterface'); } private function getMockDivisor() { return $this->getMock('Guzzle\Batch\BatchDivisorInterface'); } private function getMockBatchBuilder() { return BatchBuilder::factory() ->transferWith($this->getMockTransfer()) ->createBatchesWith($this->getMockDivisor()); } public function testFactoryCreatesInstance() { $builder = BatchBuilder::factory(); $this->assertInstanceOf('Guzzle\Batch\BatchBuilder', $builder); } public function testAddsAutoFlush() { $batch = $this->getMockBatchBuilder()->autoFlushAt(10)->build(); $this->assertInstanceOf('Guzzle\Batch\FlushingBatch', $batch); } public function testAddsExceptionBuffering() { $batch = $this->getMockBatchBuilder()->bufferExceptions()->build(); $this->assertInstanceOf('Guzzle\Batch\ExceptionBufferingBatch', $batch); } public function testAddHistory() { $batch = $this->getMockBatchBuilder()->keepHistory()->build(); $this->assertInstanceOf('Guzzle\Batch\HistoryBatch', $batch); } public function testAddsNotify() { $batch = $this->getMockBatchBuilder()->notify(function() {})->build(); $this->assertInstanceOf('Guzzle\Batch\NotifyingBatch', $batch); } /** * @expectedException Guzzle\Common\Exception\RuntimeException */ public function testTransferStrategyMustBeSet() { $batch = BatchBuilder::factory()->createBatchesWith($this->getMockDivisor())->build(); } /** * @expectedException Guzzle\Common\Exception\RuntimeException */ public function testDivisorStrategyMustBeSet() { $batch = BatchBuilder::factory()->transferWith($this->getMockTransfer())->build(); } public function testTransfersRequests() { $batch = BatchBuilder::factory()->transferRequests(10)->build(); $this->assertInstanceOf('Guzzle\Batch\BatchRequestTransfer', $this->readAttribute($batch, 'transferStrategy')); } public function testTransfersCommands() { $batch = BatchBuilder::factory()->transferCommands(10)->build(); $this->assertInstanceOf('Guzzle\Batch\BatchCommandTransfer', $this->readAttribute($batch, 'transferStrategy')); } }