Skip to content

Commit

Permalink
BlogHelper::removeCtrlChars (#3184)
Browse files Browse the repository at this point in the history
Co-authored-by: thangnn <[email protected]>
Co-authored-by: ryuring <[email protected]>
  • Loading branch information
3 people authored Mar 4, 2024
1 parent 26c6c90 commit 310a0de
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions plugins/bc-blog/src/View/Helper/BlogHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -1315,8 +1315,10 @@ public function mailFormLink($title, $contentsName, $datas = [], $options = [])

/**
* 文字列から制御文字を取り除く
* @return string
* @checked
* @noTodo
* @unitTest
*/
public function removeCtrlChars($string)
{
Expand Down
6 changes: 4 additions & 2 deletions plugins/bc-blog/tests/TestCase/View/Helper/BlogHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1007,8 +1007,10 @@ public function testMailFormLink()
*/
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 310a0de

Please sign in to comment.