Open Journal Systems
3.3.0
CommaAggregatorTest.php
1
<?php
2
3
namespace
Guzzle\Tests\Http
;
4
5
use
Guzzle\Http\QueryString
;
6
use
Guzzle\Http\QueryAggregator\CommaAggregator
as Ag;
7
8
class
CommaAggregatorTest
extends
\Guzzle\Tests\GuzzleTestCase
9
{
10
public
function
testAggregates
()
11
{
12
$query =
new
QueryString
();
13
$a =
new
Ag();
14
$key =
'test 123'
;
15
$value = array(
'foo 123'
,
'baz'
,
'bar'
);
16
$result = $a->aggregate($key, $value, $query);
17
$this->assertEquals(array(
'test%20123'
=>
'foo%20123,baz,bar'
), $result);
18
}
19
20
public
function
testEncodes
()
21
{
22
$query =
new
QueryString
();
23
$query->useUrlEncoding(
false
);
24
$a =
new
Ag();
25
$key =
'test 123'
;
26
$value = array(
'foo 123'
,
'baz'
,
'bar'
);
27
$result = $a->aggregate($key, $value, $query);
28
$this->assertEquals(array(
'test 123'
=>
'foo 123,baz,bar'
), $result);
29
}
30
}
Guzzle\Tests\GuzzleTestCase
Definition:
GuzzleTestCase.php:22
Guzzle\Http\QueryString
Definition:
QueryString.php:14
Guzzle\Tests\Http\CommaAggregatorTest\testEncodes
testEncodes()
Definition:
CommaAggregatorTest.php:20
Guzzle\Tests\Http\CommaAggregatorTest\testAggregates
testAggregates()
Definition:
CommaAggregatorTest.php:10
Guzzle\Tests\Http\CommaAggregatorTest
Definition:
CommaAggregatorTest.php:8
Guzzle\Http\QueryAggregator\CommaAggregator
Definition:
CommaAggregator.php:10
Guzzle\Tests\Http
Definition:
AbstractEntityBodyDecoratorTest.php:3
plugins
paymethod
paypal
lib
vendor
guzzle
guzzle
tests
Guzzle
Tests
Http
QueryAggregator
CommaAggregatorTest.php
Generated on Fri Aug 28 2020 14:51:09 for Open Journal Systems by
1.8.17