Example #1
0
 public function testRemoveAction()
 {
     $res = new Response();
     $res->addForm('add-item', array('title' => 'Add Item', 'method' => 'POST', 'href' => '/post'));
     $res->addForm('delete-item', array('title' => 'Delete Item', 'method' => 'DELETE', 'href' => '/post/123'));
     $res->removeForm('delete-item');
     $expected = array('actions' => array(array('name' => 'add-item', 'title' => 'Add Item', 'method' => 'POST', 'href' => '/post')));
     $format = new Formatter\Siren($res);
     $this->assertEquals($expected, $format->toArray());
 }