Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Chris Hartjes' Blog:
Testing Components In CakePHP
Jul 05, 2007 @ 12:16:38

Chris Hartjes has posted a quick example of a useful method for CakePHP developers - how to test components.

Using the test suite is actually quite easy: drop SimpleTest into your cake/vendors directly and you're ready to start writing your tests. Having written tests using SimpleTest before it wasn't going to be too hard for me to get them done. But there was one little problem: how do you test a component?

He includes an example of such a test, running it on his Email controller to try to send an email via SMTP.

tagged: cakephp framework unittest simpletest email controller smtp cakephp framework unittest simpletest email controller smtp

Link:


Trending Topics: