Skip to content

Latest commit

 

History

History
47 lines (44 loc) · 889 Bytes

DEVELOPMENT.md

File metadata and controls

47 lines (44 loc) · 889 Bytes

Start up

Set a PHP version. It essentially means which .Dockerfile will be used

export PHP_VERSION=7

Create example/.env and fill in it with actual data

cp example/.example.env example/.env 

Build docker images and start containers

docker compose up -d

Get into the container

docker compose exec php sh

PHPUnit

Run a method

vendor/bin/phpunit --filter 'AlexGeno\\PhoneVerificationTests\\Manager\\DefaultConfigTest::testExpiredOtpException'  --debug

Check code coverage

vendor/bin/phpunit --coverage-text

CodeSniffer

Check

vendor/bin/phpcs 

Fix

vendor/bin/phpcbf

CLI Demo

Initiation

php example/initiate.php --storage redis --sender messageBird --to +15417543010

Completion

php example/complete.php --storage redis --to +15417543010 --otp 1111