Skip to content

Commit 1196442

Browse files
Fix RollbarTest
1 parent 9fd757d commit 1196442

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/RollbarTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,14 @@ public function testMergedContext()
107107
public function testLogListener()
108108
{
109109
$exception = new \Exception('Testing error handler');
110+
111+
$responseMock = \Mockery::mock('Rollbar\Response');
112+
$responseMock->shouldReceive('getStatus')->times(3)->andReturn(200);
110113

111114
$clientMock = \Mockery::mock('Rollbar\RollbarLogger');
112115

113-
$clientMock->shouldReceive('log')->times(2);
114-
$clientMock->shouldReceive('log')->times(1)->with('error', $exception, ['foo' => 'bar']);
116+
$clientMock->shouldReceive('log')->times(2)->andReturn($responseMock);
117+
$clientMock->shouldReceive('log')->times(1)->with('error', $exception, ['foo' => 'bar'])->andReturn($responseMock);
115118

116119
$handlerMock = \Mockery::mock('Rollbar\Laravel\RollbarLogHandler', [$clientMock, $this->app]);
117120

0 commit comments

Comments
 (0)