Skip to content

Commit 98e8303

Browse files
committed
refactor: Move getDb method to a new location in TestCase.php for improved organization.
1 parent 0cf2d55 commit 98e8303

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tests/TestCase.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,6 @@ protected function setUp(): void
9292
$this->mockConsoleApplication();
9393
}
9494

95-
/**
96-
* Returns the database connection used for tests.
97-
*/
98-
protected function getDb(): Connection
99-
{
100-
return Yii::$app->getDb();
101-
}
102-
10395
/**
10496
* Asserts that a list of tree nodes matches the expected order.
10597
*
@@ -387,6 +379,14 @@ protected function getDataSetMultipleTree(): array
387379
return array_values($dataSetMultipleTree);
388380
}
389381

382+
/**
383+
* Returns the database connection used for tests.
384+
*/
385+
protected function getDb(): Connection
386+
{
387+
return Yii::$app->getDb();
388+
}
389+
390390
/**
391391
* Returns a dataset containing only {@see Tree} nodes.
392392
*

0 commit comments

Comments
 (0)