xp-framework/xp-framework — pull request #164 by ghiata (2012-05-22 16:07:15+00:00)
Title: Support for REST Object collections [test]

These tests exemplify the case of nested objects as the following scenario:

class Issues has a member named $issues which should be an array of IssueWithField objects.

This is how the Issues object should look like:
```php
object(net·xp_framework·unittest·webservices·rest·Issues)#1067 (2) {
["issues"]=>
array(2) {
[0]=>
object(net·xp_framework·unittest·webservices·rest·IssueWithField) (2) {
["issue_id"]=>
int(1)
["title"]=>
string(11) "Found a bug"
}
[1]=>
object(net·xp_framework·unittest·webservices·rest·IssueWithField) (2) {
["issue_id"]=>
int(2)
["title"]=>
string(7) "Another"
}
}
}
}
````
However, right now it's being created with an undesired structure:
```php
object(net·xp_framework·unittest·webservices·rest·Issues)#1067 (2) {
["issues"]=>
array(1) {
["issue"]=>
array(2) {
[0]=>
array(2) {
["issue_id"]=>
int(1)
["title"]=>
string(11) "Found a bug"
}
[1]=>
array(2) {
["issue_id"]=>
int(2)
["title"]=>
string(7) "Another"
}
}
}
}
````
These tests will fail.