Skip to content

Commit e029a58

Browse files
authored
Small minor details for local dev (#125)
1 parent d729dc3 commit e029a58

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

CONTRIBUTING.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
## MySQL
44

5-
To execute the test suite, you need running a MySQL server.
5+
To execute the test suite, you need a running MySQL server.
6+
67
The easiest way to get them up and running is using Docker:
78

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

1415
## Postgres
1516

16-
To execute the test suite, you need running a PostgreSQL server.
17+
To execute the test suite, you need a running PostgreSQL server.
18+
1719
The easiest way to get them up and running is using Docker:
1820

1921
docker run --rm -e POSTGRES_PASSWORD=postgres -p 5432:5432 -d postgres

tests/bootstrap.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,19 @@
77
* with this source code in the file LICENSE.
88
*/
99

10+
use Symfony\Component\Console\Input\ArrayInput;
11+
use Symfony\Component\Console\Output\ConsoleOutput;
12+
use Symfony\Component\Console\Style\SymfonyStyle;
13+
1014
date_default_timezone_set('UTC');
1115

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

19+
if (!isset($_SERVER['DATABASE_URL'])) {
20+
(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.");
21+
22+
exit(1);
23+
}
24+
1525
return $loader;

0 commit comments

Comments
 (0)