diff --git a/plugins/bc-mail/tests/TestCase/View/Helper/MailHelperTest.php b/plugins/bc-mail/tests/TestCase/View/Helper/MailHelperTest.php
index f97651d2f6..0779e58e28 100644
--- a/plugins/bc-mail/tests/TestCase/View/Helper/MailHelperTest.php
+++ b/plugins/bc-mail/tests/TestCase/View/Helper/MailHelperTest.php
@@ -149,9 +149,9 @@ public function testGetToken()
* メールフォームへのリンクを取得
* @dataProvider linkProvider
*/
- public function testLink($title, $contentsName, $expected)
+ public function testLink($title, $contentsName, $url, $expected)
{
- ContentFactory::make(['plugin' => 'BcMail', 'type' => 'MailContent', 'name' => $contentsName, 'entity_id' => 1])->persist();
+ ContentFactory::make(['plugin' => 'BcMail', 'type' => 'MailContent', 'name' => $contentsName, 'url' => $url, 'entity_id' => 1])->persist();
$this->expectOutputString($expected);
$this->MailHelper->link($title, $contentsName);
}
@@ -159,15 +159,10 @@ public function testLink($title, $contentsName, $expected)
public static function linkProvider()
{
return [
- ['タイトル', 'Members', 'タイトル'],
- [' ', 'a', ' '],
- [' ', ' ', ' '],
- [' ', '///', ' '],
- [' ', '////a', ' '],
- [' ', '////a//a/aa', ' '],
- [' ', '/../../../../a', ' '],
- ['', 'javascript:void(0);', ''],
- ['', '////a', '<script>alert(1)</script>']
+ ['タイトル', '/Members/', '/a/', 'タイトル'],
+ [' ', 'a', '/a/', ' '],
+ [' ', ' ', '', ' '],
+ [' ', '///', '///', ' '],
];
}