Skip to content

Commit

Permalink
Improve tests
Browse files Browse the repository at this point in the history
  • Loading branch information
staudenmeir committed Feb 7, 2024
1 parent 08ffc2e commit 35e6a2f
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion tests/Concatenation/EloquentJsonRelations/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ protected function setUp(): void
{
parent::setUp();

$this->database = getenv('DATABASE') ?: 'sqlite';
$this->database = getenv('DB_CONNECTION') ?: 'sqlite';

if ($this->database !== 'mysql') {
$this->markTestSkipped();
Expand Down
2 changes: 1 addition & 1 deletion tests/Concatenation/LaravelAdjacencyList/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ protected function setUp(): void
{
parent::setUp();

$this->database = getenv('DATABASE') ?: 'sqlite';
$this->database = getenv('DB_CONNECTION') ?: 'sqlite';

if ($this->database === 'mysql') {
$this->markTestSkipped();
Expand Down
2 changes: 1 addition & 1 deletion tests/Concatenation/LaravelHasManyMerged/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ abstract class TestCase extends Base

protected function setUp(): void
{
$this->database = getenv('DATABASE') ?: 'sqlite';
$this->database = getenv('DB_CONNECTION') ?: 'sqlite';

parent::setUp();

Expand Down
2 changes: 1 addition & 1 deletion tests/IdeHelper/DeepRelationsHookTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ protected function setUp(): void
$config = require __DIR__.'/../config/database.php';

$db = new DB();
$db->addConnection($config[getenv('DATABASE') ?: 'sqlite']);
$db->addConnection($config[getenv('DB_CONNECTION') ?: 'sqlite']);
$db->setAsGlobal();
$db->bootEloquent();
}
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ abstract class TestCase extends Base

protected function setUp(): void
{
$this->database = getenv('DATABASE') ?: 'sqlite';
$this->database = getenv('DB_CONNECTION') ?: 'sqlite';

parent::setUp();

Expand Down
8 changes: 4 additions & 4 deletions tests/config/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
return [
'mysql' => [
'driver' => 'mysql',
'host' => '127.0.0.1',
'host' => 'mysql',
'port' => '3306',
'database' => 'eloquent-has-many-deep',
'username' => 'homestead',
'password' => 'secret',
'database' => 'test',
'username' => 'root',
'password' => 'password',
'unix_socket' => '',
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
Expand Down

0 comments on commit 35e6a2f

Please sign in to comment.