public function testConstructWithLinkObject()
{
$self = new SelfLink('/dogs');
$parent = new Resource($self);
$actual = json_decode($parent);
$JSON = <<<EOF
{
"_links":{
"self":{
"href":"\\/dogs"
}
}
}
EOF;
$expected = json_decode($JSON);
$this->assertEquals($expected, $actual);
}