Another thought about Unit testing emails:
One should not actually test for mails being actually sent on
application testing level. Testing that the EmailComponent works
correctly should be part of the core tests. Afaik those do not exist
yet, but if somebody is looking into writing code
) don't let
you specify the port. And I really want to stick with EmailComponent
instead of using PHPMailer.
I develop on a Mac and don't really want to set up a mail server and
programmatically check a POP mail account in the unit tests.
Does anyone have a clever solution for unit testing emails
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
I develop on a Mac and don't really want to set up a mail server and
programmatically check a POP mail account in the unit tests.
Does anyone have a clever solution for unit testing emails?
Roll your own sendmail which intercepts STDIN and saves
On 4/4/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
I'm using the new unit testing functionality in 1.2 with SimpleTest
and was wondering if anyone else has figured out a way to unit test
emails sent by the EmailComponent?
Does the unit testing functionality support mock objects? That's
and
programmatically check a POP mail account in the unit tests.
Does anyone have a clever solution for unit testing emails?
Roll your own sendmail which intercepts STDIN and saves it to a file
somewhere?
PHP will first look for sendmail in your PATH, and then in the
following: /usr/bin:/usr/sbin:/usr/etc
.
Does anyone have a clever solution for unit testing emails?
Roll your own sendmail which intercepts STDIN and saves it to a file
somewhere?
PHP will first look for sendmail in your PATH, and then in the
following: /usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib.
However
Thanks for posting this link Felix. Fakemail looks like a grouse tool.
I will definitely be adding it to my test suite.
Regards
Langdon
Felix Geisendörfer wrote:
Haven't tried it, but this is the CGI / Python solution advocated by the
SimpleTest folks:
Just be aware that if you can't run Fakemail on port 25 then you need
to specify the port in PHP to send the email from. The EmailComponent
and the PHP mail() function don't let you do that.
On 4/4/07, Langdon Stevenson [EMAIL PROTECTED] wrote:
Thanks for posting this link Felix. Fakemail
Hi Zach
Just be aware that if you can't run Fakemail on port 25 then you need
to specify the port in PHP to send the email from. The EmailComponent
and the PHP mail() function don't let you do that.
Thanks for the warning.
All of my projects are currently running on Cake 1.1.x.x with