Author: Jakub Skowron
A PHP application based on Domain-Driven Design (DDD) for a bank account and payment system.
- PHP 8.2
- Docker
- Composer
-
Clone the repository to your local machine:
git clone <repository-url> cd <repository-folder>
-
Build the Docker image and install dependencies:
make install
-
To run unit tests, execute:
make test
-
To stop and remove Docker containers after testing:
make clean
-
Install dependencies using Composer:
composer install
-
Run unit tests locally:
./vendor/bin/phpunit tests
- Domain – Domain logic, aggregates, entities, value objects, and policies.
- Application – Use cases and application services.
- Infrastructure – Implementations of repositories and other technical infrastructure.
- Tests – Unit tests.
You can run unit tests in Docker by following these steps:
-
Build the Docker image:
make install
-
Run the container and execute the tests:
make test
-
Stop and remove the container after tests:
make clean
Alternatively, you can run the tests locally without Docker using:
./vendor/bin/phpunit tests