joomla/joomla-platform — pull request #1168 by AmyStephen (2012-04-22 12:40:33+00:00)
Title: Add Email Logger for JLog

I did a little reading on testing email capabilities and found recommendations to use a mocked class to simulate the email function. I noticed that JLoggerMessageQueueTest mocks up JApplication, so I used that approach as a guide.

For the most part, the testing worked perfectly, except I am unable to retrieve the mock class properties from the test in a similar manner to how the application mock object is referenced.

What I ended up doing (which I do not recommend be a permanent change), but I changed the Logger Mail class to be public so that I could do the comparisons using that approach.

Would appreciate feedback on what I should be doing to use the Mock class properties.

Also, these are essentially my first Unit tests, so any direction is appreciated.