Skip to content

Commit

Permalink
add unitTest_BlogHelper_removeCtrlChars
Browse files Browse the repository at this point in the history
  • Loading branch information
thangnn committed Feb 29, 2024
1 parent ae28522 commit f178de8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
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 @@ -1317,6 +1317,7 @@ public function mailFormLink($title, $contentsName, $datas = [], $options = [])
* 文字列から制御文字を取り除く
* @checked
* @noTodo
* @unitTest
*/
public function removeCtrlChars($string)
{
Expand Down
7 changes: 5 additions & 2 deletions plugins/bc-blog/tests/TestCase/View/Helper/BlogHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1004,11 +1004,14 @@ public function testMailFormLink()

/**
* 文字列から制御文字を取り除く
* removeCtrlChars
*/
public function testRemoveCtrlChars()
{
$this->markTestIncomplete('こちらのテストはまだ未確認です');
$this->markTestIncomplete('このテストは、まだ実装されていません。');
$string = "\eBaserCMS \t\tHello \v\vWorld\0\f";
$result = $this->Blog->removeCtrlChars($string);
//戻り値を確認
$this->assertEquals('BaserCMS Hello World', $result);
}

/**
Expand Down

0 comments on commit f178de8

Please sign in to comment.