Posted in Linux/Unix/OpenSource by: sean
No Comments
29 Feb
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 “automated” dir under app/tests/cases/, with a file called permissions.test.php: <?php class PermissionsTestCase extends CakeWebTestCase { var $mysite = “http://test.mysite.com”; function setUp() { } function tearDown() { [...]
Posted in Linux/Unix/OpenSource, Personal by: sean
No Comments
29 Feb
Testing models is straightforward, see http://bakery.cakephp.org/articles/view/testing-models-with-cakephp-1-2-test-suite Testing a controller though… Why is there nothing good out there that tells you how to test a controller, other than references to Felix’s work that doesn’t use simpletest? That said, testing a controller should look something like – Create controller object – Call an action – Poke at [...]