Here's an example:
/app/tests/app/cases/controllers/comments_controller.test.php:

require CONTROLLERS . 'comments_controller.php';

class CommentsControllerTestCase extends UnitTestCase {

        function setUp() {
                $this->comments = new CommentsController();
                $this->comments->constructClasses();
        }

        function testCommentsIndexData() {
                $this->comments->index(2);
                $this->assertTrue(!empty($this->comments->_viewVars));
                
$this->assertTrue(isset($this->comments->_viewVars['comments']));
        }
}

Note that you need to have the test suite installed per the tutorial on
the wiki.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to