Hal\Tests\ResourceTest::testConstructWithLinkObject PHP Method

testConstructWithLinkObject() public method

    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);
    }