This project contains all scripts to fetch and store data as well as a fully functioning API to fetch this data.
The project is based on PHP 8.3, API-Platform 3.4 and Symfony 6.4
Six types of data are currently available:
Prerequisites:
- Have docker installed
- Have docker-compose installed
Installation:
-
Clone the repository:
git clone git@github.com:instamedsolutions/api_test.git
-
Navigate to the project directory:
cd api_test -
Create an empty SQLite file that will be used by Docker:
touch test_db.sqlite
-
Start the Instamed project to ensure the instamed network is up.
-
Start the Docker services for this project:
docker-compose up -d
-
Access the shell in the api_test container and install Composer dependencies:
make shell composer install
To run the docker environment you can start the docker server with the following command :
docker-compose upAll code is tested using phpunit All test files are in the tests/ folder in 3 sub folders :
- Unit : Contains all unit tests of the project
- Integration : Contains all the integration tests of the project
- Functional : Contains all the functional tests of the project
To run the tests, run the command
make phpunit