Skip to content

Commit

Permalink
Small minor details for local dev (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierstoval authored Feb 23, 2023
1 parent d729dc3 commit e029a58
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
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;

0 comments on commit e029a58

Please sign in to comment.