Steps to test the code (using PHPUnit) are following:
- Install PHP and required extensions
- Download/Install composer
- Install Docker
- Setup docker containers (continue reading)
- Run tests with "composer test"
The following is a list of commands to be given on the host machine to setup docker containers.
Setup a PostgreSQL database:
docker run -d -p 5432:5432 \
--name gishiki-postgres \
-e POSTGRES_PASSWORD=vagrant \
-e POSTGRES_USER=vagrant \
-e POSTGRES_DB=travis \
postgres:10.1-alpine
Setup a MySQL database:
docker run -d -p 3306:3306 \
--name gishiki-mysql \
-e MYSQL_ALLOW_EMPTY_PASSWORD=yes \
-e MYSQL_DATABASE=travis \
mysql:8.0.3
Then you are ready to test the framework:
composer install # mandatory: download dependencies
export COMPOSER_PROCESS_TIMEOUT=600 # give testing some time to process
composer test
Source code of Gishiki must be following PSR-2 specification.
You can improve the framework by applying a pull request on the GitHub repo.
When adding new source code you have to provide PHPUnit tests to cover at least 90% of new source.
When adding a new class you must provide your full name and, optionally, your email address.