|
@@ 48-62 (lines=15) @@
|
| 45 |
|
* |
| 46 |
|
* @return void |
| 47 |
|
*/ |
| 48 |
|
public function testRqlSelectionOnArrays() |
| 49 |
|
{ |
| 50 |
|
$expectedResult = json_decode( |
| 51 |
|
file_get_contents(dirname(__FILE__).'/../resources/serializer-exclusion-array.json'), |
| 52 |
|
false |
| 53 |
|
); |
| 54 |
|
|
| 55 |
|
$client = static::createRestClient(); |
| 56 |
|
$client->request( |
| 57 |
|
'GET', |
| 58 |
|
'/testcase/primitivearray/testdata?select(hash.strarray,arrayhash.intarray,arrayhash.hasharray)' |
| 59 |
|
); |
| 60 |
|
$this->assertEquals(Response::HTTP_OK, $client->getResponse()->getStatusCode()); |
| 61 |
|
$this->assertEquals($expectedResult, $client->getResults()); |
| 62 |
|
} |
| 63 |
|
|
| 64 |
|
/** |
| 65 |
|
* Test testRqlSelectionOnNested testing the correct serialization of deeply nested values |
|
@@ 69-83 (lines=15) @@
|
| 66 |
|
* |
| 67 |
|
* @return void |
| 68 |
|
*/ |
| 69 |
|
public function testRqlSelectionOnNested() |
| 70 |
|
{ |
| 71 |
|
$expectedResult = json_decode( |
| 72 |
|
file_get_contents(dirname(__FILE__).'/../resources/serializer-exclusion-nested.json'), |
| 73 |
|
false |
| 74 |
|
); |
| 75 |
|
|
| 76 |
|
$client = static::createRestClient(); |
| 77 |
|
$client->request( |
| 78 |
|
'GET', |
| 79 |
|
'/testcase/nullextref/testdata?select(requiredExtref,requiredExtrefDeep.deep.deep,optionalExtrefDeep)' |
| 80 |
|
); |
| 81 |
|
$this->assertEquals(Response::HTTP_OK, $client->getResponse()->getStatusCode()); |
| 82 |
|
$this->assertEquals($expectedResult, $client->getResults()); |
| 83 |
|
} |
| 84 |
|
} |
| 85 |
|
|