Open Journal Systems
3.3.0
BatchClosureDivisorTest.php
1
<?php
2
3
namespace
Guzzle\Tests\Batch
;
4
5
use
Guzzle\Batch\BatchClosureDivisor
;
6
10
class
BatchClosureDivisorTest
extends
\Guzzle\Tests\GuzzleTestCase
11
{
15
public
function
testEnsuresCallableIsCallable
()
16
{
17
$d =
new
BatchClosureDivisor
(
new
\stdClass());
18
}
19
20
public
function
testDividesBatch
()
21
{
22
$queue = new \SplQueue();
23
$queue[] =
'foo'
;
24
$queue[] =
'baz'
;
25
26
$d =
new
BatchClosureDivisor
(
function
(\SplQueue $queue, $context) {
27
return
array(
28
array(
'foo'
),
29
array(
'baz'
)
30
);
31
},
'Bar!'
);
32
33
$batches = $d->
createBatches
($queue);
34
$this->assertEquals(array(array(
'foo'
), array(
'baz'
)), $batches);
35
}
36
}
Guzzle\Tests\GuzzleTestCase
Definition:
GuzzleTestCase.php:22
Guzzle\Batch\BatchClosureDivisor
Definition:
BatchClosureDivisor.php:10
Guzzle\Batch\BatchClosureDivisor\createBatches
createBatches(\SplQueue $queue)
Definition:
BatchClosureDivisor.php:41
Guzzle\Tests\Batch
Definition:
AbstractBatchDecoratorTest.php:3
Guzzle\Tests\Batch\BatchClosureDivisorTest
Definition:
BatchClosureDivisorTest.php:10
Guzzle\Tests\Batch\BatchClosureDivisorTest\testEnsuresCallableIsCallable
testEnsuresCallableIsCallable()
Definition:
BatchClosureDivisorTest.php:15
Guzzle\Tests\Batch\BatchClosureDivisorTest\testDividesBatch
testDividesBatch()
Definition:
BatchClosureDivisorTest.php:20
plugins
paymethod
paypal
lib
vendor
guzzle
guzzle
tests
Guzzle
Tests
Batch
BatchClosureDivisorTest.php
Generated on Fri Aug 28 2020 14:50:53 for Open Journal Systems by
1.8.17