diff --git a/tests/bootstrap.php b/tests/bootstrap.php old mode 100644 new mode 100755 index abc3176..4e393ea --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -53,6 +53,7 @@ 'locales' => [APP . 'Locale' . DS], ] ]); + Cake\Core\Configure::write('debug', true); $tmpDirectory = new \Cake\Filesystem\Folder(TMP); @@ -85,28 +86,19 @@ 'defaults' => 'php' ]); -// Ensure default test connection is defined -if (!getenv('db_class')) { - putenv('db_class=Cake\Database\Driver\Sqlite'); - putenv('db_dsn=sqlite::memory:'); -} -ConnectionManager::config('test', [ - 'className' => 'Cake\Database\Connection', - 'driver' => getenv('db_class'), - 'dsn' => getenv('db_dsn'), - 'database' => getenv('db_database'), - 'username' => getenv('db_login'), - 'password' => getenv('db_password'), - 'timezone' => 'UTC' -]); -ConnectionManager::config('test_migrations', [ - 'className' => 'Cake\Database\Connection', - 'driver' => getenv('db_class'), - 'dsn' => getenv('db_dsn'), - 'database' => getenv('db_database'), - 'username' => getenv('db_login'), - 'password' => getenv('db_password'), - 'timezone' => 'UTC' +Cake\Datasource\ConnectionManager::config('test', [ + 'className' => 'Cake\Database\Connection', + 'driver' => 'Cake\Database\Driver\Sqlite', + 'persistent' => false, + 'host' => 'localhost', + //'port' => 'non_standard_port_number', + 'username' => '', + 'password' => '', + 'database' => 'test', + 'encoding' => 'utf8mb4', + 'timezone' => 'UTC', + 'cacheMetadata' => true, + 'quoteIdentifiers' => true ]); $settingsFixture = new \Vamshop\Core\Test\Fixture\SettingsFixture(); @@ -115,8 +107,9 @@ $settingsFixture->create(\Cake\Datasource\ConnectionManager::get('default')); $settingsFixture->insert(\Cake\Datasource\ConnectionManager::get('default')); +Plugin::load('Acl', ['bootstrap' => true]); +Plugin::load('ADmad/JwtAuth'); Plugin::load('Vamshop/Core', ['bootstrap' => true, 'routes' => true]); -Plugin::load('Vamshop/Settings', ['bootstrap' => true, 'routes' => true]); Cake\Routing\DispatcherFactory::add('Routing'); Cake\Routing\DispatcherFactory::add('ControllerFactory');