# 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.

**Example**

The event controller is located at:

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

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

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

{% hint style="warning" %}
Do not include the `Controllers` directory within the folder structure of the Test class.
{% endhint %}

{% hint style="success" %}
Ensure that the module name in the `test/Functional` directory matches the exact case of the module in the `app/Modules` directory.&#x20;
{% endhint %}

***Example:***

Controller’s Name:

```bash
EventsController.php
```

Test Case Name:

```bash
EventsControllerTest.php
```
