Skip to content

Commit

Permalink
BlogHelper::getContentsUrlのユニットテスト (#3066)
Browse files Browse the repository at this point in the history
Co-authored-by: Đỗ Văn Hùng <[email protected]>
  • Loading branch information
HungDV2022 and dovanhung authored Jan 29, 2024
1 parent 94dc904 commit 7d29964
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions plugins/bc-blog/src/View/Helper/BlogHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -1939,6 +1939,7 @@ public function isBlog()
* @return string
* @checked
* @noTodo
* @unitTest
*/
public function getContentsUrl(int $blogContentId, $base = true)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1289,7 +1289,12 @@ public static function isBlogDataProvider()
*/
public function testGetContentsUrl()
{
$this->markTestIncomplete('このテストは、まだ実装されていません。');
//データ生成
$this->loadFixtureScenario(InitAppScenario::class);
//ブログコンテンツのURLメソッドをコール
$rs = $this->Blog->getContentsUrl(1);
//戻る値を確認
$this->assertEquals('https://localhost/news/', $rs);
}

/**
Expand Down

0 comments on commit 7d29964

Please sign in to comment.