3.2 TestApplication Structure & .gitignore

  1. Config directory with base files

    mkdir -p tests/TestApplication/config
    touch tests/TestApplication/config/{bundles.php,config.yaml,routes.yaml}
  2. Environment files

    touch tests/TestApplication/.env tests/TestApplication/.env.test
  3. Update .gitignore Add TestApplication local files to .gitignore::

    /var/
    /tests/TestApplication/.env.local
    /tests/TestApplication/.env.*.local

Optional (only if your plugin needs it)

  • templates/ - create this if your plugin overrides templates.

    mkdir -p tests/TestApplication/templates
  • src/Entity - create this if your plugin extends Sylius entities

    mkdir -p tests/TestApplication/src/Entity
  • services_test.php - create this if you need test-specific service configuration

    touch tests/TestApplication/config/services_test.php

Example minimal structure

tests/TestApplication/
├── config/
│   ├── bundles.php
│   ├── config.yaml
│   └── routes.yaml
├── .env
└── .env.test

Add templates/, Entity/, or services_test.php only when needed.

Last updated

Was this helpful?