@@ 11-18 (lines=8) @@ | ||
8 | { |
|
9 | use \Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration; |
|
10 | ||
11 | public function testStoreAndRetrieveEventId() |
|
12 | { |
|
13 | $recorder = new SentryEventRecorder(); |
|
14 | $exception = new \Exception(); |
|
15 | $recorder->addExceptionEventId($exception, 'abc'); |
|
16 | ||
17 | $this->assertEquals('abc', $recorder->getEventIdForException($exception)); |
|
18 | } |
|
19 | ||
20 | public function testRetrieveAllIds() |
|
21 | { |
|
@@ 43-51 (lines=9) @@ | ||
40 | $this->assertEquals(null, $recorder->getEventIdForException('some string')); |
|
41 | } |
|
42 | ||
43 | public function testIgnoresUnknownObjects() |
|
44 | { |
|
45 | $recorder = new SentryEventRecorder(); |
|
46 | $exception = new \Exception(); |
|
47 | $otherException = new \Exception(); |
|
48 | $recorder->addExceptionEventId($exception, 'abc'); |
|
49 | ||
50 | $this->assertEquals(null, $recorder->getEventIdForException($otherException)); |
|
51 | } |
|
52 | ||
53 | public function testIgnoresEmptyIds() |
|
54 | { |
|
@@ 53-60 (lines=8) @@ | ||
50 | $this->assertEquals(null, $recorder->getEventIdForException($otherException)); |
|
51 | } |
|
52 | ||
53 | public function testIgnoresEmptyIds() |
|
54 | { |
|
55 | $recorder = new SentryEventRecorder(); |
|
56 | $exception = new \Exception(); |
|
57 | $recorder->addExceptionEventId($exception, ''); |
|
58 | ||
59 | $this->assertEquals(null, $recorder->getEventIdForException($exception)); |
|
60 | } |
|
61 | } |
|
62 |