Skip to content

Commit

Permalink
bbPress connector test cleaned up
Browse files Browse the repository at this point in the history
  • Loading branch information
kidunot89 committed Feb 8, 2021
1 parent 727f89e commit a2c868a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/tests/connectors/test-class-connector-bbpress.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function setUp() {

// Make partial of Connector_BbPress class, with mocked "log" function.
$this->mock = $this->getMockBuilder( Connector_BbPress::class )
->setMethods( [ 'log' ] )
->setMethods( array( 'log' ) )
->getMock();

$this->mock->register();
Expand Down Expand Up @@ -52,7 +52,7 @@ public function test_log_override() {
'wp_stream_log_data',
function( $data ) use( &$asserted ) {
$message = _x(
'"%1$s" %2$s updated',
'"%1$s" %2$s published',
'1: Post title, 2: Post type singular name',
'stream'
);
Expand Down Expand Up @@ -86,10 +86,10 @@ public function test_callback_bbp_toggle_topic_admin() {
// Create forum and topic for later use.
$forum_id = bbp_insert_forum( [ 'post_title' => 'Test Forum' ] );
$topic_id = bbp_insert_topic(
[
array(
'post_title' => 'Test Topic',
'post_parent' => $forum_id,
]
)
);
$topic = get_post( $topic_id );

Expand Down Expand Up @@ -123,6 +123,6 @@ public function test_callback_bbp_toggle_topic_admin() {
);

// Check callback test action.
$this->assertGreaterThan( 0, did_action( 'wp_stream_test_callback_bbp_toggle_topic_admin' ) );
$this->assertGreaterThan( 0, did_action( $this->action_prefix . 'callback_bbp_toggle_topic_admin' ) );
}
}

0 comments on commit a2c868a

Please sign in to comment.