Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BcBaserHelper::_initPluginBasers() ユニットテスト #3818

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions plugins/baser-core/src/View/Helper/BcBaserHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -1716,6 +1716,7 @@ public function getUri($url)
* @return void
* @checked
* @noTodo
* @unitTest
*/
protected function _initPluginBasers()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1499,6 +1499,23 @@ public static function getUriDataProvider()
];
}

/**
* test _initPluginBasers
* @return void
*/
public function test_initPluginBasers()
{
//データ生成
PluginFactory::make(['name' => 'BcMail'])->persist();

//対象メソッドを実行
$this->execPrivateMethod($this->BcBaser, '_initPluginBasers', []);
$_pluginBasers = $this->getPrivateProperty($this->BcBaser, '_pluginBasers');

//戻り値を確認
$this->assertArrayHasKey('BcMail', $_pluginBasers);
}

/**
* 文字列を検索しマークとしてタグをつける
* @param string $search 検索文字列
Expand Down
Loading