Testing

To test the library, you needs two things:

  • PHPUnit installed
  • A CouchDB database running.

By default, the library is binded to “http://localhost:5984”. You can change the host and the port by exporting ENV variables before running the tests.

Variables

Name Type Default Description
DB_HOST String localhost The host of the database (ip or dsn)
DB_PORT Integer 5984 The port of the database. Note: for the moment, you can’t change the port if you’re using the docker image.

Install PHPUnit

The easy way to install PHPUnit is to use composer. In the project root, execute this :

composer install --dev

Run tests