Skip to content

Commit

Permalink
downgrade AntispamBeeTest to 5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
websupporter committed Jun 1, 2018
1 parent dc53d49 commit 3b90f93
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions tests/Unit/AntispamBeeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,32 +112,32 @@ public function test_spam_reasons( $comment, $reason ) {
* @return array
*/
public function spam_reasons_data_provider() {
return [
[
return array(
array(
// Detect spam word regex pattern in author.
[
array(
'comment_author' => 'Buy Viagra',
],
),
'regexp',
],
[
),
array(
// Detect BBCode spam in content.
[
array(
'comment_content' => "Test BB Spam\n[url=www.google.com]Link[/url]",
],
),
'bbcode',
],
),
// Detect spam word regex pattern combination content + mail.
// Attention, the order of the provided data here is important -.-, needs a rework of the codebase
// @ToDo: static $_reason
[
[
array(
array(
'comment_content' => "this is a pharmacy, why does it work now?.",
'comment_author_email' => 'test@yandex.ru',
],
),
'regexp',
],
];
),
);
}

/**
Expand All @@ -148,13 +148,13 @@ public function spam_reasons_data_provider() {
* @return array
*/
private function get_base_comment() {
return [
return array(
'comment_ID' => 1,
'comment_author' => 'Test Author',
'comment_author_email' => 'test.author@mail.server',
'comment_author_url' => 'www.testdomain.com',
'comment_author_IP' => '128.0.0.1',
'comment_content' => 'This is the base test comment.',
];
);
}
}

0 comments on commit 3b90f93

Please sign in to comment.