Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

Commit

Permalink
Correção do método testSaveActionPostRequest() para incluir o parâmet…
Browse files Browse the repository at this point in the history
…ro id no POST

O parâmetro id está marcado para "required" no inputFilter do Model, então é necessário incluí-lo na requisição para que o teste passe.
  • Loading branch information
daniel-braga committed Aug 11, 2013
1 parent 0f92dcb commit 815f4e1
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ public function testSaveActionPostRequest()
$this->routeMatch->setParam('action', 'save');

$this->request->setMethod('post');
$this->request->getPost()->set('id', '');
$this->request->getPost()->set('title', 'Apple compra a Coderockr');
$this->request->getPost()->set(
'body', 'A Apple compra a <b>Coderockr</b><br> '
Expand Down Expand Up @@ -187,4 +188,4 @@ private function addPost()
$saved = $this->getTable('Skel\Model\Post')->save($post);
return $saved;
}
}
}

0 comments on commit 815f4e1

Please sign in to comment.