GinoPane / php-dynamodb-odm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AWS Dynamodb ODM for PHP

Code style, unit and functional tests

This is a library and an Object Document Mapper to use with AWS DynamoDB in a more convenient way.

Usage

To be added soon...

Local dev environment installation

  1. In order to build a dev image, please, run:
docker-compose build
  1. Then run to install dependencies:
docker-compose run --no-deps dynamodb-odm composer install

Running tests

Unit tests

This package uses phpspec for running unit tests.

Run them using the following way:

docker-compose run --no-deps dynamodb-odm vendor/bin/phpspec run

One can use environment variables in the .env.local file to be able to debug the library. For this just Copy file .env.local.sample into .env.local and set up the variable according to your OS.

And then run the tests with:

docker-compose --env-file ./.env.local run  --no-deps dynamodb-odm vendor/bin/phpspec run

Functional tests

This package uses behat for running functional tests.

Then just run the tests:

docker-compose run dynamodb-odm vendor/bin/behat -c behat.yml --stop-on-failure

Syntax check tests

You need to check if the code style is OK by running:

docker-compose run --no-deps dynamodb-odm vendor/bin/phpcs  --basepath=/application/src  --standard=PSR2 src

About

License:Apache License 2.0


Languages

Language:PHP 95.6%Language:Gherkin 4.3%Language:Dockerfile 0.1%