Skip to content

Commit

Permalink
Test last event not set if the event was not sent
Browse files Browse the repository at this point in the history
  • Loading branch information
stayallive committed Oct 12, 2018
1 parent 68e10ff commit 79d7252
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/ClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,19 @@ public function testGetLastEvent()
$this->assertSame($lastEvent, $client->getLastEvent());
}

public function testGetLastEventEmptyIfNotSent()
{
$client = ClientBuilder::create([
'should_capture' => function () {
return false;
},
])->getClient();

$client->capture(['message' => 'foo']);

$this->assertNull($client->getLastEvent());
}

/**
* @group legacy
*
Expand Down

0 comments on commit 79d7252

Please sign in to comment.