Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

## MySQL

To execute the test suite, you need running a MySQL server.
To execute the test suite, you need a running MySQL server.

The easiest way to get them up and running is using Docker:

docker run --rm --platform=linux/amd64 -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=odm -p 3306:3306 -d mysql
Expand All @@ -13,7 +14,8 @@ Then run the test suite:

## Postgres

To execute the test suite, you need running a PostgreSQL server.
To execute the test suite, you need a running PostgreSQL server.

The easiest way to get them up and running is using Docker:

docker run --rm -e POSTGRES_PASSWORD=postgres -p 5432:5432 -d postgres
Expand Down
10 changes: 10 additions & 0 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,19 @@
* with this source code in the file LICENSE.
*/

use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Output\ConsoleOutput;
use Symfony\Component\Console\Style\SymfonyStyle;

date_default_timezone_set('UTC');

$loader = require __DIR__.'/../vendor/autoload.php';
require __DIR__.'/Fixtures/AppKernel.php';

if (!isset($_SERVER['DATABASE_URL'])) {
(new SymfonyStyle(new ArrayInput([]), new ConsoleOutput()))->error("DATABASE_URL environment var is not set.\nCheck the CONTRIBUTING.md file for more details about how to test this project.");

exit(1);
}

return $loader;