diff --git a/test/Functional/AbstractFunctionalTest.php b/test/Functional/AbstractFunctionalTest.php index 8d40509..cdea483 100644 --- a/test/Functional/AbstractFunctionalTest.php +++ b/test/Functional/AbstractFunctionalTest.php @@ -25,6 +25,7 @@ use Psr\Container\NotFoundExceptionInterface; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; +use RuntimeException; use function array_merge; use function getenv; @@ -54,6 +55,12 @@ public function setUp(): void $this->initPipeline(); $this->initRoutes(); + if ($this->isTestMode() && ! $this->getEntityManager()->getConnection()->getParams()['memory']) { + throw new RuntimeException( + 'You are running tests in a non in-memory database. + Did you forgot to create the local.test.php file?' + ); + } if (method_exists($this, 'runMigrations')) { $this->runMigrations(); }