GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

testNotifiesRecorderViaCaptureException()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 19
Code Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 19
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 13
nc 1
nop 0
1
<?php
2
3
namespace Classmarkets\RavenBundle\Tests;
4
5
use Classmarkets\RavenBundle\RecordingRavenClient;
6
7
class RecordingRavenClientTest extends \PHPUnit\Framework\TestCase
8
{
9
    use \Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
10
11
    public function testNotifiesRecorderViaCaptureException()
12
    {
13
        $exception = new \Exception();
14
15
        $realRavenClient = \Mockery::mock('Raven_Client');
16
        $realRavenClient
17
            ->shouldReceive('captureException')
18
            ->with($exception, [], null, [])
19
            ->andReturn('123');
20
        $realRavenClient->shouldReceive('getIdent')->with('123')->andReturn('456');
21
22
        $recorder = \Mockery::mock('Classmarkets\RavenBundle\SentryEventRecorder');
23
        $recorder->shouldReceive('addExceptionEventId')->with($exception, '456');
24
25
        $ourRavenClient = new RecordingRavenClient($realRavenClient, $recorder);
26
27
        $eventId = $ourRavenClient->captureException($exception);
28
        $this->assertEquals('123', $eventId);
29
    }
30
31
    public function testDelegatesMethods()
32
    {
33
        $realRavenClient = \Mockery::mock('Raven_Client');
34
        $realRavenClient->shouldReceive('captureMessage')->once()->with('foobar');
35
36
        $recorder = \Mockery::mock('Classmarkets\RavenBundle\SentryEventRecorder');
37
38
        $ourRavenClient = new RecordingRavenClient($realRavenClient, $recorder);
39
        $ourRavenClient->captureMessage('foobar');
40
    }
41
42
    public function testInstanceOfOriginClient()
43
    {
44
        $realRavenClient = \Mockery::mock('Raven_Client');
45
        $recorder = \Mockery::mock('Classmarkets\RavenBundle\SentryEventRecorder');
46
47
        $ourRavenClient = new RecordingRavenClient($realRavenClient, $recorder);
48
49
        $this->assertInstanceOf('Raven_Client', $ourRavenClient);
50
    }
51
}
52