Re: Email mock not working
Hey, The component is not a problem, it's working fine. But when I'm testing the code it sends e-mails every time, making the tests last much longer. How can I correct it? Thanks, Thiago On 31 mar, 02:03, LITTO CHACKO wrote: > Why don't you use the cakephp builtin component email it is nice and > > > > > > > > > > > easy to use > > it can be include by:_ > > public $components = array('Session','Email'); > > > and can be used to send email by:_ > > $pass = array('fullname'=>$name,'password'=>$p,'url'=>$url, > > 'reference'=>$reference,'email'=>$email); > > $this->set('emailValues',$pass); > > $this->Email->to = $email; > > $this->Email->subject = 'Welcome Mail fromjustdeals.com'; > > $this->Email->replyTo = 'no-re...@image.com'; > > $this->Email->from = 'no-reply'; > > $this->Email->template = 'account_created'; > > $this->Email->sendAs = 'html'; > > $this->Email->send(); > > > you have a corresponding account_created.ctp(as in example) file in the > > folder views_>emails->html->... > > > thanks ; > > -- > Litto Chacko > Axtec Softwares -- 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Email mock not working
Hello, I'm trying to use the mock when testing the e-mail sender. But it's not working. My code is: $Users = $this->generate('Users', array('components' => array( 'Email' => array( 'sendConfirmationEmail'; $Users->Email->expects($this->once())->method('sendConfirmationEmail')- >will($this->returnValue(true)); I'm using the EmailComponent in the UsersController, and the sendConfirmationEmail is the method I want to mock. Can anybody help me? Thanks, Thiago -- 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
MeioUpload 4.0 and CakePHP 2.1
Hello, I'm trying to use MeioUpload 4.0 with CakePHP 2.1, but I'm getting this error: Warning (2): finfo_file(A): failed to open stream: No such file or directory [APP/Plugin/MeioUpload/Model/Behavior/ MeioUploadBehavior.php, line 578] Warning (2): mime_content_type(A) [http://php.net/function.mime- content-type]: failed to open stream: No such file or directory [APP/ Plugin/MeioUpload/Model/Behavior/MeioUploadBehavior.php, line 584] Can anybody help me? Thanks, Thiago -- 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Links in the setFlash
Hello, I'm trying to insert links in the Session->setFlash method, but it's not working. I've tried to use Html helper in the controller but it crashed. I'm using version 2.1. Thanks, Thiago -- 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Including JQuery
Hello, I'm using CakePHP 2.0.4 and I tried to use JQuery with it. But when I write in the controller $helpers = array('jquery') everything stops working. And I get a messagem saing that the function create isn't recognized. Can I find any tutorial about that? Thanks, Thiago -- 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
HABTM Fixture
Hi, How can I create a fixture for a HABTM table? I have tried everything but my tests always say the table is missing. Thanks, Thiago -- 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php