Свежайшие Пирожки от CakePHP по-русски

Полнейшее руководство CakePHP 1.2 на русском языке, горячие новости и полезные статьи

Creating tests

First, lets go through a number of rules, or guidelines, concerning tests:

  1. PHP files containing tests should be in your app/tests/cases/[some_folder].
  2. The filenames of these files should end in .test.php instead of just .php.
  3. The classes containing tests should extend CakeTestCase or CakeWebTestCase.
  4. 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.