Example #1
0
 public function testRemoveLink()
 {
     $res = new Response();
     $res->addLink('self', 'http://localhost/foo/bar');
     $res->addLink('next', 'http://localhost/foo/bar?page=2');
     $res->removeLink('self');
     $expected = array('links' => array(array('rel' => array('next'), 'href' => 'http://localhost/foo/bar?page=2')));
     $format = new Formatter\Siren($res);
     $this->assertEquals($expected, $format->toArray());
 }