Open Journal Systems
3.3.0
PhpAggregatorTest.php
1
<?php
2
3
namespace
Guzzle\Tests\Http
;
4
5
use
Guzzle\Http\QueryString
;
6
use
Guzzle\Http\QueryAggregator\PhpAggregator
as Ag;
7
8
class
PhpAggregatorTest
extends
\Guzzle\Tests\GuzzleTestCase
9
{
10
public
function
testEncodes
()
11
{
12
$query =
new
QueryString
();
13
$query->useUrlEncoding(
false
);
14
$a =
new
Ag();
15
$key =
't'
;
16
$value = array(
17
'v1'
=>
'a'
,
18
'v2'
=>
'b'
,
19
'v3'
=> array(
20
'v4'
=>
'c'
,
21
'v5'
=>
'd'
,
22
)
23
);
24
$result = $a->aggregate($key, $value, $query);
25
$this->assertEquals(array(
26
't[v1]'
=>
'a'
,
27
't[v2]'
=>
'b'
,
28
't[v3][v4]'
=>
'c'
,
29
't[v3][v5]'
=>
'd'
,
30
), $result);
31
}
32
}
Guzzle\Tests\GuzzleTestCase
Definition:
GuzzleTestCase.php:22
Guzzle\Http\QueryString
Definition:
QueryString.php:14
Guzzle\Http\QueryAggregator\PhpAggregator
Definition:
PhpAggregator.php:10
Guzzle\Tests\Http\PhpAggregatorTest\testEncodes
testEncodes()
Definition:
PhpAggregatorTest.php:10
Guzzle\Tests\Http\PhpAggregatorTest
Definition:
PhpAggregatorTest.php:8
Guzzle\Tests\Http
Definition:
AbstractEntityBodyDecoratorTest.php:3
plugins
paymethod
paypal
lib
vendor
guzzle
guzzle
tests
Guzzle
Tests
Http
QueryAggregator
PhpAggregatorTest.php
Generated on Fri Aug 28 2020 14:53:01 for Open Journal Systems by
1.8.17