Open Journal Systems  3.3.0
DuplicateAggregatorTest.php
1 <?php
2 
3 namespace Guzzle\Tests\Http;
4 
7 
9 {
10  public function testAggregates()
11  {
12  $query = new QueryString();
13  $a = new Ag();
14  $key = 'facet 1';
15  $value = array('size a', 'width b');
16  $result = $a->aggregate($key, $value, $query);
17  $this->assertEquals(array('facet%201' => array('size%20a', 'width%20b')), $result);
18  }
19 
20  public function testEncodes()
21  {
22  $query = new QueryString();
23  $query->useUrlEncoding(false);
24  $a = new Ag();
25  $key = 'facet 1';
26  $value = array('size a', 'width b');
27  $result = $a->aggregate($key, $value, $query);
28  $this->assertEquals(array('facet 1' => array('size a', 'width b')), $result);
29  }
30 }
Guzzle\Tests\Http\DuplicateAggregatorTest\testAggregates
testAggregates()
Definition: DuplicateAggregatorTest.php:10
Guzzle\Tests\Http\DuplicateAggregatorTest\testEncodes
testEncodes()
Definition: DuplicateAggregatorTest.php:20
Guzzle\Tests\GuzzleTestCase
Definition: GuzzleTestCase.php:22
Guzzle\Http\QueryString
Definition: QueryString.php:14
Guzzle\Tests\Http\DuplicateAggregatorTest
Definition: DuplicateAggregatorTest.php:8
Guzzle\Http\QueryAggregator\DuplicateAggregator
Definition: DuplicateAggregator.php:12
Guzzle\Tests\Http
Definition: AbstractEntityBodyDecoratorTest.php:3