Skip to content

Commit

Permalink
Merge pull request #592 from CakeDC/issue/fix-unit-tests-3.x
Browse files Browse the repository at this point in the history
Fix unit tests 3.x
  • Loading branch information
othercorey authored Nov 18, 2022
2 parents ec53672 + 1e5ff1e commit c08c4a0
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion tests/TestCase/ConfigurationTraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,16 @@ protected function _getCommandMock(string $migrationsPath, string $seedsPath): E
*/
public function testGetConfigNoMigrationsFolderDebugDisabled()
{
ConnectionManager::setConfig('default', [
'className' => 'Cake\Database\Connection',
'driver' => 'Cake\Database\Driver\Mysql',
'host' => 'foo.bar',
'username' => 'root',
'password' => 'the_password',
'database' => 'the_database',
'encoding' => 'utf-8',
]);
Configure::write('debug', false);

$migrationsPath = ROOT . DS . 'config' . DS . 'TestGetConfigMigrations';
$seedsPath = ROOT . DS . 'config' . DS . 'TestGetConfigSeeds';

Expand Down Expand Up @@ -353,6 +361,15 @@ public function testGetConfigNoSeedsFolderDebugDisabled()
*/
public function testGetConfigNoMigrationsOrSeedsFolderDebugEnabled()
{
ConnectionManager::setConfig('default', [
'className' => 'Cake\Database\Connection',
'driver' => 'Cake\Database\Driver\Mysql',
'host' => 'foo.bar',
'username' => 'root',
'password' => 'the_password',
'database' => 'the_database',
'encoding' => 'utf-8',
]);
$migrationsPath = ROOT . DS . 'config' . DS . 'TestGetConfigMigrations';
$seedsPath = ROOT . DS . 'config' . DS . 'TestGetConfigSeeds';
mkdir($migrationsPath, 0777, true);
Expand Down

0 comments on commit c08c4a0

Please sign in to comment.