Skip to content

Commit

Permalink
Merge pull request #3932 from HungDV2022/unitest_InstallationsService…
Browse files Browse the repository at this point in the history
…_getDbSource

InstallationsService::_getDbSource() のユニットテスト
  • Loading branch information
HungDV2022 authored Oct 24, 2024
2 parents 6f5cae9 + 4eab189 commit 0c8b995
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions plugins/bc-installer/src/Service/InstallationsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,7 @@ public function deployEditorTemplateImage(): bool
* @return array
* @checked
* @noTodo
* @unitTest
*/
protected function _getDbSource(): array
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,14 @@ public function testDeployEditorTemplateImage()
*/
public function test_getDbSource()
{
$this->markTestIncomplete('このテストは、まだ実装されていません。');
//準備
Configure::write('BcRequire.winSQLiteVersion', '0.0.1');
//テストを実行
$rs = $this->execPrivateMethod($this->Installations, '_getDbSource');
//戻り値を確認
$this->assertEquals('MySQL', $rs["mysql"]);
$this->assertEquals('PostgreSQL', $rs["postgres"]);
$this->assertEquals('SQLite', $rs["sqlite"]);
}

/**
Expand Down

0 comments on commit 0c8b995

Please sign in to comment.