A question about test Mock

2012-04-29 Thread Điển vũ
I met this error , Email still send . How i can do protected function __sendVerifyEmail in UsersController return true , but don't send email ? (Funciton __sendVerifyEmail use CakeEmail , not EmailComponent.) * Expectation failed for method name is equal to string:__sendVerifyEmail when

Re: A question about test Mock

2012-04-29 Thread Điển vũ
I only need to do .. $this-Users = $this-generate('Users', array( 'methods' = array( '__sendVerifyEmail' ) )); It is documented .Sorry, I confused here , after a long day do testing. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org