Skip to content

Commit

Permalink
bbPress connector test implemented.
Browse files Browse the repository at this point in the history
  • Loading branch information
kidunot89 committed Feb 8, 2021
1 parent 21696dc commit 727f89e
Show file tree
Hide file tree
Showing 5 changed files with 202 additions and 48 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"wpackagist-plugin/advanced-custom-fields": "5.8.12",
"wpackagist-plugin/easy-digital-downloads": "^2.9.23",
"wpackagist-plugin/user-switching": "^1.5.5",
"wpackagist-plugin/bbpress": "^2.6.5",
"wpsh/local": "^0.2.3"
},
"config": {
Expand Down
113 changes: 69 additions & 44 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions connectors/class-connector-bbpress.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ public function log_override( $data ) {
} elseif ( 'posts' === $data['connector'] && in_array( $data['context'], array( 'forum', 'topic', 'reply' ), true ) ) {
if ( 'reply' === $data['context'] ) {
if ( 'updated' === $data['action'] ) {
/* translators: %s: a post title (e.g. "Hello World") */
$data['message'] = esc_html__( 'Replied on "%s"', 'stream' );
/* translators: %1$s: a post title (e.g. "Hello World") */
$data['message'] = esc_html__( 'Replied on "%1$s"', 'stream' );
$data['args']['post_title'] = get_post( wp_get_post_parent_id( $data['object_id'] ) )->post_title;
}
$data['args']['post_title'] = sprintf(
Expand All @@ -222,7 +222,7 @@ public function log_override( $data ) {
}

/**
* Tracks togging the forum topics
* Tracks toggling the forum topics
*
* @param bool $success If action success.
* @param \WP_Post $post_data Post data.
Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<php>
<const
name="WP_TEST_ACTIVATED_PLUGINS"
value="advanced-custom-fields/acf.php,easy-digital-downloads/easy-digital-downloads.php,user-switching/user-switching.php"
value="advanced-custom-fields/acf.php,bbpress/bbpress.php,easy-digital-downloads/easy-digital-downloads.php,user-switching/user-switching.php"
/>
</php>
<testsuites>
Expand Down
Loading

0 comments on commit 727f89e

Please sign in to comment.