Creating a Functional Test File

Creating a Test File

All functional tests for the API are located under the test/Functional directory. The functional tests directory contains PHP files with the same name as a controller with the suffix “Test”; these are the Test Case files.


The event controller is located at:

- app
  - Modules
    - Events
      - Http
        - Controllers
          - EventsController.php

Therefore the Test Case file for the Events Controller will be located at:

- tests
  - Functional
    - Events
      - Http
        - EventsControllerTest.php

Do not include the Controllers directory within the folder structure of the Test class.

Ensure that the module name in the test/Functional directory matches the exact case of the module in the app/Modules directory.


Controller’s Name:


Test Case Name:


Last updated