Skip to content

Commit

Permalink
Fix bug in reddit test
Browse files Browse the repository at this point in the history
  • Loading branch information
jwensley2 committed Jun 12, 2015
1 parent e48ecf0 commit 3187274
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tests/HipChat/Commands/RedditTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ class RedditTest extends HipChatTestCase
* Test the trigger method
*
* @dataProvider triggerTestProvider
* @param string $message The webhook message
* @param array $posts The reddit posts
* @param array $config
* @param bool $displayablePosts Whether posts array should contain posts that can be displayed
* @param RoomMessage $message The webhook message
* @param array $posts The reddit posts
* @param array $config
* @param bool $displayablePosts Whether posts array should contain posts that can be displayed
*/
public function testTrigger($message, $posts, $config, $displayablePosts)
{
Expand All @@ -30,6 +30,7 @@ public function testTrigger($message, $posts, $config, $displayablePosts)
'data' => ['children' => $posts]
]);

/** @var \GuzzleHttp\Client|\PHPUnit_Framework_MockObject_MockObject $clientMock */
$clientMock = $this->getMockBuilder('\GuzzleHttp\Client')
->setMethods(['get'])
->getMock();
Expand Down Expand Up @@ -137,7 +138,7 @@ protected function createPost($nsfw = null)
],
'score' => $faker->numberBetween(-1000, 1000),
'approved_by' => null,
'over_18' => ($nsfw) ? $nsfw : $faker->boolean(),
'over_18' => !is_null($nsfw) ? $nsfw : $faker->boolean(),
'hidden' => false,
'num_comments' => $faker->numberBetween(0, 1000),
'thumbnail' => '',
Expand Down

0 comments on commit 3187274

Please sign in to comment.