From 0435e6697a24f912aab95374d7121c37ab7d2699 Mon Sep 17 00:00:00 2001 From: Mark Story Date: Sun, 19 Sep 2021 16:40:13 -0400 Subject: [PATCH] Add fallback database to improve first run Also update code example in the comments. --- config/app_local.example.php | 2 +- tests/bootstrap.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/config/app_local.example.php b/config/app_local.example.php index e892f52cff..200f89e531 100644 --- a/config/app_local.example.php +++ b/config/app_local.example.php @@ -70,7 +70,7 @@ 'password' => 'secret', 'database' => 'test_myapp', //'schema' => 'myapp', - 'url' => env('DATABASE_TEST_URL', null), + 'url' => env('DATABASE_TEST_URL', 'sqlite://127.0.0.1/tests.sqlite'), ], ], diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 25c891be93..c94f186726 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -62,5 +62,6 @@ // If you are not using CakePHP's migrations you can // hook into your migration tool of choice here or // load schema from a SQL dump file with -// \Cake\TestSuite\Schema\SchemaManager::create('tests', './tests/schema.sql'); +// use Cake\TestSuite\SchemaLoader; +// (new SchemaManager())->loadSqlFiles('./tests/schema.sql', 'test'); (new Migrator())->run();