$this-> Posts = $this->generate('Posts', array(
'models' => array(
'Post' => array('exists')
)
));
$this->Posts->Post
->expects($this->once())->method('exists')->will($this->returnValue(false));
$this->testAction('/user/posts/edit/' . $post['Post']['id'], array(.....
*I expects a exception at here:*
function user_edit(){
if (!$this->Post->exists()) {
throw new NotFoundException(__('Invalid post'));
}
but i keep get this error . What am i doing wrong ?
*
Expectation failed for method name is equal to <string:validates> when invoked
1 time(s).
Method was expected to be called 1 times, actually called 0 times.
*
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php