Creating tests
First, lets go through a number of rules, or guidelines, concerning tests:
- PHP files containing tests should be in your app/tests/cases/[some_folder].
- The filenames of these files should end in .test.php instead of just .php.
- The classes containing tests should extend CakeTestCase or CakeWebTestCase.
- The name of any method containing a test (i.e. containing an assertion) should begin with test, as in testPublished().
When you have created a test case, you can execute it by browsing to http://your.cake.domain/cake_folder/test.php (depending on how your specific setup looks) and clicking App test cases, and then click the link to your specific file.


Коментарии:
Добавить коментарий