Browse Source

Default SchemaLoader connection test

Corey Taylor 4 years ago
parent
commit
7c4fc74d11
2 changed files with 3 additions and 3 deletions
  1. 2 2
      src/TestSuite/Fixture/SchemaLoader.php
  2. 1 1
      tests/bootstrap.php

+ 2 - 2
src/TestSuite/Fixture/SchemaLoader.php

@@ -57,7 +57,7 @@ class SchemaLoader
      */
     public function loadSqlFiles(
         $paths,
-        string $connectionName,
+        string $connectionName = 'test',
         bool $dropTables = true,
         bool $truncateTables = false
     ): void {
@@ -99,7 +99,7 @@ class SchemaLoader
      * @return void
      * @internal
      */
-    public function loadInternalFile(string $file, string $connectionName): void
+    public function loadInternalFile(string $file, string $connectionName = 'test'): void
     {
         // Don't reload schema when we are in a separate process state.
         if (isset($GLOBALS['__PHPUNIT_BOOTSTRAP'])) {

+ 1 - 1
tests/bootstrap.php

@@ -142,5 +142,5 @@ session_id('cli');
 // Create test database schema
 if (env('FIXTURE_SCHEMA_METADATA')) {
     $loader = new SchemaLoader();
-    $loader->loadInternalFile(env('FIXTURE_SCHEMA_METADATA'), 'test');
+    $loader->loadInternalFile(env('FIXTURE_SCHEMA_METADATA'));
 }