Sean's ObsessionsJust another WordPress weblogTesting via screen scraping- March 1, 2008 Trying to figure out how to write a test based on screen scraping. Easiest example is to make sure that certain URIs redirect to the login screen. Created an &8220;automated&8221; dir under apptestscases, with a file called permissions.test.php: &60;php class PermissionsTestCase extends CakeWebTestCase var $mysite = "http:test.mysite.com"; ...http://ertw.com/blog/2008/02/29/testing-via-screen-scraping/ How the hell do you test a controller- March 1, 2008 Testing models is straightforward, see http:bakery.cakephp.orgarticlesviewtesting-models-with-cakephp-1-2-test-suite Testing a controller though&8230; Why is there nothing good out there that tells you how to test a controller, other than references to Felix&8217;s work that doesn&8217;t use simpletest That said, testing a controller should look something like - Create controller object - Call an action - Poke at the controller to make ...http://ertw.com/blog/2008/02/29/how-the-hell-do-you-test-a-controller/ |